Skip to content

Commit

Permalink
Vendor trpl crate so The Book tests work offline
Browse files Browse the repository at this point in the history
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

# Conflicts:
#	src/bootstrap/src/core/build_steps/vendor.rs
  • Loading branch information
chriskrycho committed Nov 23, 2024
1 parent d4275e0 commit 7630b49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/src/core/build_steps/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub fn default_paths_to_vendor(builder: &Builder<'_>) -> Vec<(PathBuf, Vec<&'sta
("src/tools/rustbook/Cargo.toml", SUBMODULES_FOR_RUSTBOOK.into()),
("src/tools/rustc-perf/Cargo.toml", vec!["src/tools/rustc-perf"]),
("src/tools/opt-dist/Cargo.toml", vec![]),
("src/doc/book/packages/trpl/Cargo.toml", vec![]),
]
.into_iter()
.map(|(path, submodules)| (builder.src.join(path), submodules))
Expand Down

0 comments on commit 7630b49

Please sign in to comment.