From 30f9f6049001256971d7bb329aee5d41b617d006 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Wed, 20 Nov 2024 07:59:09 -0700 Subject: [PATCH] Vendor `trpl` crate so The Book tests work offline Without this change: $ ./x test --set build.vendor=true src/doc/book # (lots of output) error: failed to select a version for the requirement `futures = "^0.3"` (locked to 0.3.30) candidate versions found which didn't match: 0.3.31, 0.3.27 location searched: directory source `/Users/chris/dev/rust-lang/rust/vendor` (which is replacing registry `crates-io`) required by package `trpl v0.2.0 (/Users/chris/dev/rust-lang/rust/src/doc/book/packages/trpl)` perhaps a crate was updated and forgotten to be re-vendored? Build completed unsuccessfully in 0:01:19 With this change: $ ./x test --set build.vendor=true src/doc/book # (lots of build output) Testing stage1 mdbook src/doc/book (aarch64-apple-darwin) finished in 86.949 seconds Build completed successfully in 0:04:05 --- src/bootstrap/src/core/build_steps/vendor.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bootstrap/src/core/build_steps/vendor.rs b/src/bootstrap/src/core/build_steps/vendor.rs index 82a6b4d4f28cb..7bca47ffe3c61 100644 --- a/src/bootstrap/src/core/build_steps/vendor.rs +++ b/src/bootstrap/src/core/build_steps/vendor.rs @@ -17,6 +17,7 @@ pub fn default_paths_to_vendor(builder: &Builder<'_>) -> Vec { "src/tools/rustbook/Cargo.toml", "src/tools/rustc-perf/Cargo.toml", "src/tools/opt-dist/Cargo.toml", + "src/doc/book/packages/trpl/Cargo.toml", ] { paths.push(builder.src.join(p)); }