Change the blanket submodule update for library submodules to be required

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
https://github.com/rust-lang/rust/pull/82653). However, it would require
updating these in almost every Step (anything that runs `cargo` in the
main workspace).
This commit is contained in:
Eric Huss
2024-07-27 08:04:46 -07:00
parent 9b0115c743
commit 686e27ef49
+7 -1
View File
@@ -441,7 +441,13 @@ pub fn new(mut config: Config) -> 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();