From 686e27ef49ab0d0d84e451311529283269d456e8 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 27 Jul 2024 08:04:46 -0700 Subject: [PATCH] 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). --- src/bootstrap/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 431b04ae77462..68dfc89c5a1a4 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -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();