Skip to content

Migrate to Bazel 9#880

Open
KVSRoyal wants to merge 13 commits into
player-1-dot-zerofrom
bazel-9
Open

Migrate to Bazel 9#880
KVSRoyal wants to merge 13 commits into
player-1-dot-zerofrom
bazel-9

Conversation

@KVSRoyal

@KVSRoyal KVSRoyal commented Jun 12, 2026

Copy link
Copy Markdown
Member

Note

This targets 1.0 branch to prevent churn after 1.0 is merged, but is not actually part of 1.0. This can be merged after 1.0 goes in.

Migrate to Bazel 9.1.1---let's stay modern! Includes:

  • Update all package versions to something compatible with Bazel 9

  • Remove duplicate fast-sort from package.json

  • Make implicit Bazel rule loads explicit, e.g. JavaInfo, sh_test, etc.

    Why? Bazel <9 allowed us to implicitly import some things that are no longer implicitly imported in Bazel 9 (ref), e.g. sh_test. Instead, the guidance from Bazel is that we explicitly load what we want.

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major
  • N/A. skip-release

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

@KVSRoyal KVSRoyal added the skip-release Preserve the current version when merged label Jun 12, 2026
@intuit-svc

intuit-svc commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results

Comparison against baseline from main. ⚠️ = regression (>10% slower), ✅ = improvement (>5% faster)

core/player ⚠️

Benchmark Current Baseline Change
core/player/src/binding/__tests__/parser.bench.ts > parser benchmarks > Resolving binding: foo.bar 712.03K ops/s 814.11K ops/s -12.5% ⚠️
core/player/src/binding/__tests__/parser.bench.ts > parser benchmarks > Resolving binding: foo.pets.1.name 438.18K ops/s 520.99K ops/s -15.9% ⚠️
core/player/src/binding/__tests__/parser.bench.ts > parser benchmarks > Resolving binding: foo.pets.01.name 478.89K ops/s 484.39K ops/s -1.1%
core/player/src/binding/__tests__/parser.bench.ts > parser benchmarks > Resolving binding: foo.pets['01'].name 429.56K ops/s 443.70K ops/s -3.2%
core/player/src/binding/__tests__/parser.bench.ts > parser benchmarks > Resolving binding: foo.pets[01].name 432.26K ops/s 448.52K ops/s -3.6%
core/player/src/binding/__tests__/parser.bench.ts > parser benchmarks > Resolving binding: foo.pets[name = "frodo"].type 287.14K ops/s 229.59K ops/s +25.1% ✅
core/player/src/binding/__tests__/parser.bench.ts > parser benchmarks > Resolving binding: foo.pets["name" = "sprinkles"].type 223.08K ops/s 236.56K ops/s -5.7%
core/player/src/binding/__tests__/parser.bench.ts > parser benchmarks > Resolving binding: foo.pets["isDog" = false].type 276.66K ops/s 293.76K ops/s -5.8%
core/player/src/binding/__tests__/parser.bench.ts > parser benchmarks > Resolving binding: foo.pets["isDog" = true].type 287.68K ops/s 291.77K ops/s -1.4%
core/player/src/binding/__tests__/parser.bench.ts > binding creation benchmarks > Resolving binding: foo.bar 559.07K ops/s 585.10K ops/s -4.4%
core/player/src/binding/__tests__/parser.bench.ts > binding creation benchmarks > Resolving binding: foo.pets.1.name 383.86K ops/s 362.44K ops/s +5.9% ✅
core/player/src/binding/__tests__/parser.bench.ts > binding creation benchmarks > Resolving binding: foo.pets.01.name 351.41K ops/s 365.41K ops/s -3.8%
core/player/src/binding/__tests__/parser.bench.ts > binding creation benchmarks > Resolving binding: foo.pets['01'].name 324.94K ops/s 337.57K ops/s -3.7%
core/player/src/binding/__tests__/parser.bench.ts > binding creation benchmarks > Resolving binding: foo.pets[01].name 371.55K ops/s 360.75K ops/s +3.0%
core/player/src/binding/__tests__/parser.bench.ts > binding creation benchmarks > Resolving binding: foo.pets[name = "frodo"].type 218.09K ops/s 231.82K ops/s -5.9%
core/player/src/binding/__tests__/parser.bench.ts > binding creation benchmarks > Resolving binding: foo.pets["name" = "sprinkles"].type 186.18K ops/s 195.10K ops/s -4.6%
core/player/src/binding/__tests__/parser.bench.ts > binding creation benchmarks > Resolving binding: foo.pets["isDog" = false].type 231.39K ops/s 234.64K ops/s -1.4%
core/player/src/binding/__tests__/parser.bench.ts > binding creation benchmarks > Resolving binding: foo.pets["isDog" = true].type 248.07K ops/s 233.18K ops/s +6.4% ✅
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = 1 + 3 (sync) 401.28K ops/s 386.32K ops/s +3.9%
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = 1 + 3 (async) 323.32K ops/s 355.63K ops/s -9.1%
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: conditional(true, true, false) (sync) 335.67K ops/s 467.51K ops/s -28.2% ⚠️
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: conditional(true, true, false) (async) 369.45K ops/s 427.69K ops/s -13.6% ⚠️
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = conditional({{bar}} > 0, true, false) (sync) 186.94K ops/s 141.47K ops/s +32.1% ✅
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = conditional({{bar}} > 0, true, false) (async) 151.63K ops/s 146.09K ops/s +3.8%
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = conditional(conditional(true = false, false, true), conditional(false = false, true, false), conditional(true = true, false, true)) (sync) 149.27K ops/s 140.98K ops/s +5.9% ✅
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = conditional(conditional(true = false, false, true), conditional(false = false, true, false), conditional(true = true, false, true)) (async) 147.29K ops/s 151.43K ops/s -2.7%
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = await(asyncTestFunction(1)) (sync) N/A N/A N/A
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = await(asyncTestFunction(1)) (async) 275.31K ops/s 261.47K ops/s +5.3% ✅
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = asyncTestFunction(1) (sync) 235.47K ops/s 345.63K ops/s -31.9% ⚠️
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = asyncTestFunction(1) (async) 281.17K ops/s 269.48K ops/s +4.3%
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: asyncTestFunction(1) (sync) 698.30K ops/s 834.09K ops/s -16.3% ⚠️
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: asyncTestFunction(1) (async) 646.15K ops/s 640.68K ops/s +0.9%
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = conditional(!{{bar}} == false, await(asyncTestFunction(1)), false) (sync) 169.87K ops/s 161.30K ops/s +5.3% ✅
core/player/src/expressions/__tests__/performance.bench.ts > Expression Parsing/Execution Benchmark > Parsing: {{foo}} = conditional(!{{bar}} == false, await(asyncTestFunction(1)), false) (async) 160.79K ops/s 158.47K ops/s +1.5%
core/player/src/view/resolver/__tests__/index.bench.ts > resolver benchmarks > initial resolve 584.74 ops/s 545.34 ops/s +7.2% ✅
core/player/src/view/resolver/__tests__/index.bench.ts > resolver benchmarks > Resolving from cache 15.17K ops/s 15.42K ops/s -1.6%
core/player/src/view/resolver/__tests__/index.bench.ts > resolver benchmarks > data changes 2.63K ops/s 2.13K ops/s +23.5% ✅
core/player/src/view/resolver/__tests__/index.bench.ts > resolver benchmarks > data changes slow 375.73 ops/s 406.30 ops/s -7.5%

plugins/async-node/core ⚠️

Benchmark Current Baseline Change
plugins/async-node/core/src/__tests__/index.bench.ts > async node benchmarks > Resolve Async Node 1 times 13.77K ops/s 8.39K ops/s +64.1% ✅
plugins/async-node/core/src/__tests__/index.bench.ts > async node benchmarks > Resolve Async Node 5 times 14.30K ops/s 10.87K ops/s +31.6% ✅
plugins/async-node/core/src/__tests__/index.bench.ts > async node benchmarks > Resolve Async Node 10 times 7.41K ops/s 8.74K ops/s -15.2% ⚠️
plugins/async-node/core/src/__tests__/index.bench.ts > async node benchmarks > Resolve Async Node 50 times 2.81K ops/s 2.48K ops/s +13.4% ✅
plugins/async-node/core/src/__tests__/index.bench.ts > async node benchmarks > Resolve Async Node 100 times 1.78K ops/s 1.40K ops/s +27.0% ✅
plugins/async-node/core/src/__tests__/transform.bench.ts > async transform benchmarks > Resolve Async Node 1 times 7.07K ops/s 7.81K ops/s -9.5%
plugins/async-node/core/src/__tests__/transform.bench.ts > async transform benchmarks > Resolve Async Node 5 times 7.38K ops/s 7.80K ops/s -5.4%
plugins/async-node/core/src/__tests__/transform.bench.ts > async transform benchmarks > Resolve Async Node 10 times 5.91K ops/s 7.66K ops/s -22.9% ⚠️
plugins/async-node/core/src/__tests__/transform.bench.ts > async transform benchmarks > Resolve Async Node 50 times 2.37K ops/s 2.53K ops/s -6.4%
plugins/async-node/core/src/__tests__/transform.bench.ts > async transform benchmarks > Resolve Async Node 100 times 1.54K ops/s 1.43K ops/s +7.5% ✅

react/player

Benchmark Current Baseline Change
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Render asset nested in 1 ReactAssets 616.25 ops/s 572.33 ops/s +7.7% ✅
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Bubble errors nested in 1 ReactAssets 1.21K ops/s 895.15 ops/s +34.8% ✅
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Render asset nested in 5 ReactAssets 620.14 ops/s 564.93 ops/s +9.8% ✅
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Bubble errors nested in 5 ReactAssets 1.01K ops/s 888.75 ops/s +13.8% ✅
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Render asset nested in 10 ReactAssets 636.67 ops/s 536.68 ops/s +18.6% ✅
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Bubble errors nested in 10 ReactAssets 877.76 ops/s 805.32 ops/s +9.0% ✅
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Render asset nested in 50 ReactAssets 519.79 ops/s 389.77 ops/s +33.4% ✅
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Bubble errors nested in 50 ReactAssets 281.13 ops/s 208.73 ops/s +34.7% ✅
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Render asset nested in 100 ReactAssets 423.66 ops/s 282.34 ops/s +50.1% ✅
react/player/src/asset/__tests__/index.bench.tsx > ReactAsset benchmarks > Bubble errors nested in 100 ReactAssets 130.12 ops/s 92.51 ops/s +40.7% ✅

Comment thread jvm/BUILD Outdated
@KVSRoyal KVSRoyal force-pushed the bazel-9 branch 2 times, most recently from da37ca9 to 5d2b421 Compare June 12, 2026 22:19
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 382.95kB (8.0%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
plugins/check-path/core 442.6kB 41 bytes (0.01%) ⬆️
plugins/async-node/core 504.25kB 41 bytes (0.01%) ⬆️
plugins/markdown/core 683.26kB 41 bytes (0.01%) ⬆️
plugins/asset-transform/core 11.25kB 3.34kB (42.22%) ⬆️⚠️
plugins/reference-assets/core 554.9kB 41 bytes (0.01%) ⬆️
plugins/beacon/core 424.2kB 41 bytes (0.01%) ⬆️
plugins/metrics/core 460.76kB 41 bytes (0.01%) ⬆️
core/player 1.02MB 146 bytes (0.01%) ⬆️
plugins/external-state/core 426.87kB 379.22kB (795.79%) ⬆️⚠️

Affected Assets, Files, and Routes:

view changes for bundle: plugins/markdown/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
MarkdownPlugin.native.js 41 bytes 658.11kB 0.01%
view changes for bundle: plugins/beacon/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
BeaconPlugin.native.js 41 bytes 409.73kB 0.01%
view changes for bundle: plugins/async-node/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
AsyncNodePlugin.native.js 41 bytes 441.63kB 0.01%
view changes for bundle: plugins/external-state/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
ExternalStatePlugin.native.js 373.57kB 407.9kB 1088.21% ⚠️
cjs/index.cjs 1.92kB 7.08kB 37.3% ⚠️
index.legacy-esm.js 1.86kB 5.94kB 45.54% ⚠️
index.mjs 1.86kB 5.94kB 45.54% ⚠️
view changes for bundle: plugins/asset-transform/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.legacy-esm.js 3.34kB 3.34kB 100.0% ⚠️
view changes for bundle: plugins/reference-assets/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
ReferenceAssetsPlugin.native.js 41 bytes 516.92kB 0.01%
view changes for bundle: plugins/metrics/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
MetricsPlugin.native.js 41 bytes 428.42kB 0.01%
view changes for bundle: core/player

Assets Changed:

Asset Name Size Change Total Size Change (%)
Player.native.js 41 bytes 426.34kB 0.01%
cjs/index.cjs 35 bytes 202.28kB 0.02%
index.legacy-esm.js 35 bytes 195.55kB 0.02%
index.mjs 35 bytes 195.55kB 0.02%
view changes for bundle: plugins/check-path/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
CheckPathPlugin.native.js 41 bytes 413.12kB 0.01%

Comment on lines -235 to 239
function("someArg", argsAsList.toTypedArray())
function("someArg", argsAsList.toTypedArray<Any?>())

val result = format.encodeToV8Value(function).v8Function
result(format, "someArg", *argsAsList.toTypedArray())
result(format, "someArg", *argsAsList.toTypedArray<Any?>())
}

@KVSRoyal KVSRoyal Jun 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes were made to be compatible with the newer kotlin compiler (that we ended up not going with). They're not hurting anything so we can leave them in for now and do slightly less work later.

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (f501972) to head (db021d4).
⚠️ Report is 27 commits behind head on player-1-dot-zero.

Additional details and impacted files
@@           Coverage Diff            @@
##   player-1-dot-zero   #880   +/-   ##
========================================
========================================

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KVSRoyal KVSRoyal marked this pull request as ready for review June 16, 2026 17:25
@KVSRoyal KVSRoyal requested review from a team as code owners June 16, 2026 17:25
Comment thread MODULE.bazel
# Make sure Bazel is using the same version of TS as the package.json.
# Otherwise it will default to newest and might change unexpectedly.
rules_ts_ext.deps(
ts_version_from = "//:package.json",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

@KVSRoyal KVSRoyal Jun 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new TS version was actually getting pulled in during migration and causing issues so I had to add this. Can confirm it helps 😆

Comment thread MODULE.bazel Outdated
node.toolchain(node_version = "22.15.1")
use_repo(node, "nodejs_toolchains")

register_toolchains("@nodejs_toolchains//:all")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently nothing! Thanks for catching that---I had it in my list to research and forgot.

Removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release Preserve the current version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants