Skip to content

Commit a013621

Browse files
authored
Unrolled build for rust-lang#122892
Rollup merge of rust-lang#122892 - lovesegfault:versioned-vendor, r=onur-ozkan fix(bootstrap/dist): use versioned dirs when vendoring Currently, if you attempt to run ui tests in a vendored build, you will see this failure ``` ---- [ui] tests/ui/issues/issue-21763.rs stdout ---- diff of stderr: 8 = note: required because it appears within the type `(Rc<()>, Rc<()>)` 9 = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send` 10 note: required because it appears within the type `hashbrown::map::HashMap<Rc<()>, Rc<()>, RandomState>` - --> $HASHBROWN_SRC_LOCATION + --> /rust/deps/hashbrown/src/map.rs:190:12 12 note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>` 13 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL 14 note: required by a bound in `foo` ``` This happens because the code that attempts to remap `HASHBROWN_SRC_LOCATION` expects it to be under `hashbrown-$version`, which is the case in a normal cargo registry, but not when vendoring, where by default crates may not have the version in their directory name. This change passes `--versioned-dirs` to `cargo vendor` to enforce that every crate includes the version in the subdir name, which fixes the ui test and brings `--enable-vendor` builds closer to normal ones.
2 parents c98ea0d + 25d0601 commit a013621

File tree

1 file changed

+1
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+1
-0
lines changed

src/bootstrap/src/core/build_steps/dist.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,7 @@ impl Step for PlainSourceTarball {
10031003
// Vendor all Cargo dependencies
10041004
let mut cmd = Command::new(&builder.initial_cargo);
10051005
cmd.arg("vendor")
1006+
.arg("--versioned-dirs")
10061007
.arg("--sync")
10071008
.arg(builder.src.join("./src/tools/cargo/Cargo.toml"))
10081009
.arg("--sync")

0 commit comments

Comments
 (0)