Skip to content

Commit

Permalink
Change the blanket submodule update for library submodules to be requ…
Browse files Browse the repository at this point in the history
…ired

These are required 100% of the time, but they are almost always required
for any command that runs Cargo in the main workspace.

Ideally, initializing these two standard library submodules would be
lazy and only initialized when required (see
rust-lang#82653). However, it would require
updating these in almost every Step (anything that runs `cargo` in the
main workspace).
  • Loading branch information
ehuss committed Jul 27, 2024
1 parent 9b0115c commit 686e27e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,13 @@ impl Build {
// Cargo.toml files.
let rust_submodules = ["library/backtrace", "library/stdarch"];
for s in rust_submodules {
build.update_submodule(s);
build.require_and_update_submodule(
s,
Some(
"The submodule is required for the standard library \
and the main Cargo workspace.",
),
);
}
// Now, update all existing submodules.
build.update_existing_submodules();
Expand Down

0 comments on commit 686e27e

Please sign in to comment.