Repository navigation
Align the Rust crate graph with V8's Chromium crate versions - #7926
Conversation
991333d to
87f3373
Compare
|
It would be nice to automate this so that when v8's crate pins change ours do as well. I did something kinda similar in the rust ICU port |
|
But as I said in the other PR, I think this is the right approach for now |
|
Since last review: 0 resolved, 0 still open, 0 new. Not re-run: design-simplicity (no author changes in their files since the last review) Reviewed commit: 767610e8 · github run |
|
💬 Approved with comments — The dependency pin and both lockfiles are consistent. One INFO remains: the Cargo.toml comment overstates how much of the ICU4X graph is on 2.2. Findings: 1 info The decision is advisory: this comment never approves, blocks or requests changes on the pull request. 📋 Code Quality: 💬 1 infoThe lockfiles are consistent. The comment on the pin still overstates how much of ICU4X is on 2.2. Recommendation: 💬 Optional Nits
View full review
✅ All other checks passed🔒 Security: ✅ LGTMNo security issues. All registry sources are crates.io, and there are no new git or path dependencies. The checksums agree between the two lockfiles. The version downgrades were not checked against crates.io or an advisory database, because this environment has no network access. 📖 AGENTS.md: ✅ LGTMNo AGENTS.md updates are needed. ⚡ Performance: ✅ LGTMNo performance concerns. 📝 Documentation: ✅ LGTMThe new comment describes the current state and says why the pin exists. Its one accuracy issue is covered in the code quality section. Reviewed commit: |
87f3373 to
55e97d4
Compare
55e97d4 to
1d5135d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## npaun/v8-rust-in-workerd #7926 +/- ##
===========================================================
Coverage ? 69.45%
===========================================================
Files ? 696
Lines ? 181370
Branches ? 29176
===========================================================
Hits ? 125966
Misses ? 38359
Partials ? 17045 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
V8's Temporal is built and tested in Chromium against third_party/rust/chromium_crates_io. Pin icu_calendar to Chromium's =2.2.1 so that every crate in temporal_capi's runtime tree resolves to Chromium's exact version within the one crates_vendor graph. icu_calendar 2.2.1 requires the ICU4X 2.2 line, and Cargo allows only one semver-compatible icu_collections, so url's idna_adapter moves to icu_normalizer/icu_properties 2.2 as well. 2.2's data is generated from Unicode 17 and 2.4's from Unicode 18 (CLDR 49), so idna's UTS 46 mapping and the properties go back one Unicode version: of every code point, 13,007 that Unicode 18 newly assigns are unassigned again, and 3 Balinese marks change Bidi_Class. 2.2 and 2.3 give identical results for every code point. Moved crates: icu_calendar 2.3.0 -> 2.2.1 icu_calendar_data 2.3.0 -> 2.2.0 icu_collections 2.4.0 -> 2.2.0 icu_locale_core 2.4.0 -> 2.3.0 icu_normalizer 2.4.0 -> 2.2.0 icu_normalizer_data 2.4.0 -> 2.2.0 icu_properties 2.4.0 -> 2.2.0 icu_properties_data 2.4.0 -> 2.2.0 icu_provider 2.4.0 -> 2.3.1 smallvec 1.16.4 -> 1.16.2 tinystr 0.8.5 -> 0.8.4 unicode-ident 1.0.27 -> 1.0.26 yoke 0.8.4 -> 0.8.3 zerovec 0.11.9 -> 0.11.8 zerovec-derive 0.11.7 -> 0.11.6 icu_locale, icu_locale_data 2.2.0 added icu_locale_fallback, icu_locale_fallback_data 2.3.0 removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1d5135d to
767610e
Compare
Stacked on #7925 (
npaun/v8-rust-in-workerd), which builds V8's Temporal againsttemporal_capifrom crates.io using workerd's own rules_rust toolchain.That base branch resolves Temporal's crates inside workerd's existing crate graph, where Cargo unification drifts several of them from the versions Chromium builds V8 15.7 with. This makes every runtime crate in
temporal_capi's tree resolve to Chromium's exact version (third_party/rust/chromium_crates_ioat the revision in V8's DEPS), within the onecrates_vendorgraph: we follow V8's versions rather than fighting them.It pins
icu_calendar = "=2.2.1". Cargo allows only one semver-compatible version of each ICU4X crate, so url/idna'sicu_normalizer/icu_properties/icu_collectionsmove to the 2.2 line too, and a few other crates in the tree (icu_locale_core,icu_provider,tinystr,yoke,zerovec,zerovec-derive) go back to Chromium's versions in the lockfile. The full table is in the commit message.Unicode data goes back one version. Main has since moved ICU4X to 2.4, whose data is generated from Unicode 18 (CLDR 49); 2.2's is Unicode 17. So idna's UTS 46 mapping and the Unicode properties regress for the 13,007 code points Unicode 18 newly assigns (unassigned again), and 3 Balinese marks change Bidi_Class. 2.2 and 2.3 give identical results for every code point. This comes back automatically once Chromium moves to a newer ICU4X.
The branch was rebased onto current main (merges cleanly), and
deps/rust/cargo-bazel-lock.json, which main now commits, was regenerated withCARGO_BAZEL_REPIN=1.Verified after the rebase:
cargo metadata --lockedpasses; the crate versions intemporal_capi's tree match Chromium'schromium_crates_io/Cargo.lock. Before the rebase: workerd built,temporal-hidden-testpassed 5/5, and 25/25 URL/IDNA-adjacent tests passed (url api tests,//src/wpt:url, htmlrewriter, kj-hyper, transpiler, python-parser, workerd-server). Those haven't been re-run on the rebased branch; CI will.Tradeoff: V8 updates now dictate the ICU4X line for the whole Rust graph, and crates held only by the lockfile can drift back on a routine
cargo update. #8058 (draft, stacked on this) addspython3 ci/v8_update.py rust-cratesto keep them aligned with V8's pinned Chromium revision.🤖 Generated with Claude Code