feat(v8)!: synchronize Rust crates with major updates#1117
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1117 +/- ##
=======================================
Coverage 63.06% 63.06%
=======================================
Files 50 50
Lines 8288 8288
=======================================
Hits 5227 5227
Misses 3061 3061 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This is a breaking change, as Cargo is now a mandatory requirement for running a major update.
|
If you have any comments on the overall approach then fire away, but I'll mark as ready for review once the associated core PR is merged, so that people can do proper test runs. |
This wasn't actually much effort to implement, so I've added this in. New example run: nodejs/node@2c67a51 |
FWIW having the other PR merged is not necessary for doing test runs, one can apply the patch on nodejs/node already. I'd like this PR to land soon so we can release 7.0.0 which is long overdue at this point (but since this is marked semver major, it makes sense to wait for it) |
|
Fair enough! Marking as ready for review, anyone testing will just need to cherry-pick nodejs/node@ff3ad1e before running git-node. |
An implementation of nodejs/node#64191 (comment). Depends on #1116 and nodejs/node#64482.
Broadly speaking, the process is as follows:
third_party/rustrepository alongside the other DEPS. Note that this never enters the Node.js git tree, as it's deliberately not exempt from .gitignore, but fetching it here can make use of the existing DEPS machinery.cargo treeto walk the temporal_capi dependency tree inthird_party/rust/chromium_crates_io, and populate a list of transitive dependencies, so that we only vendor what we need for Temporal.third_party/rust/chromium_crates_iotodeps/crates.cargo vendorhere, because Chromium uses its own gnrt toolchain to vendor its crate dependencies, which also applies any floating patches inthird_party/rust/chromium_crates_io/patches. Usingcargo vendorwould fetch fresh copies from crates.io, and miss these patches.cargo vendor, gnrt always adds some variation of the version string when naming the vendored crate directories. It doesn't matter for the rust build, since cargo doesn't care about the directory names, but it does mean that we need to update the temporal_capi include path in crates.gyp whenver we update the crates.Example result: nodejs/node@f3bf260
Like Chromium, this approach doesn't add a
rust-versionto the crates manifest; Cargo will read this from the dependencies' manifests anyway. However, while it's not necessary for the build, I appreciate that it may be useful to see if our Rust requirement has changed, for updating BUILDING.md etc. If desired, we can either add this field or output the MSRV to terminal somehow; it'd just require interrogating each dependency's Cargo.toml while walking the tree.