Ignore submodules that we're not building, or that are unused like
authorXimin Luo <infinity0@debian.org>
Sun, 20 Dec 2020 18:52:10 +0000 (18:52 +0000)
committerXimin Luo <infinity0@debian.org>
Sun, 20 Dec 2020 18:52:10 +0000 (18:52 +0000)
Forwarded: not-needed

mdbook-linkcheck that pull in a ton of dependencies that are unneeded.
===================================================================

Gbp-Pq: Name d-0000-ignore-removed-submodules.patch

Cargo.toml
src/bootstrap/bootstrap.py
src/bootstrap/builder.rs
src/bootstrap/doc.rs
src/bootstrap/test.rs
src/doc/index.md
src/tools/tidy/src/deps.rs

index 02794d1028b506b4510a71e140de62a4fb210d31..cc4645961a7f5ad9da241a4c573e097d3786fd33 100644 (file)
@@ -5,7 +5,6 @@ members = [
   "library/std",
   "library/test",
   "src/tools/cargotest",
-  "src/tools/clippy",
   "src/tools/compiletest",
   "src/tools/error_index_generator",
   "src/tools/linkchecker",
@@ -15,19 +14,11 @@ members = [
   "src/tools/tidy",
   "src/tools/tier-check",
   "src/tools/build-manifest",
-  "src/tools/remote-test-client",
-  "src/tools/remote-test-server",
   "src/tools/rust-installer",
   "src/tools/rust-demangler",
-  "src/tools/cargo",
   "src/tools/rustdoc",
-  "src/tools/rls",
-  "src/tools/rustfmt",
-  "src/tools/miri",
-  "src/tools/miri/cargo-miri",
   "src/tools/rustdoc-themes",
   "src/tools/unicode-table-generator",
-  "src/tools/expand-yaml-anchors",
 ]
 exclude = [
   "build",
@@ -69,24 +60,8 @@ gimli.debug = 0
 miniz_oxide.debug = 0
 object.debug = 0
 
-# We want the RLS to use the version of Cargo that we've got vendored in this
-# repository to ensure that the same exact version of Cargo is used by both the
-# RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository
-# so we use a `[patch]` here to override the github repository with our local
-# vendored copy.
-[patch."https://github.com/rust-lang/cargo"]
-cargo = { path = "src/tools/cargo" }
-
-[patch."https://github.com/rust-lang/rustfmt"]
-# Similar to Cargo above we want the RLS to use a vendored version of `rustfmt`
-# that we're shipping as well (to ensure that the rustfmt in RLS and the
-# `rustfmt` executable are the same exact version).
-rustfmt-nightly = { path = "src/tools/rustfmt" }
 
 [patch.crates-io]
-# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
-# here
-rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
 
 # See comments in `library/rustc-std-workspace-core/README.md` for what's going on
 # here
@@ -100,5 +75,3 @@ rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
 # source code for this crate.
 backtrace = { path = "library/backtrace" }
 
-[patch."https://github.com/rust-lang/rust-clippy"]
-clippy_lints = { path = "src/tools/clippy/clippy_lints" }
index eb36261be5852943b1322c97eaa48e08c75401ad..aed3f607b1ca838d32ad91f63dc967ad9aa026fa 100644 (file)
@@ -817,10 +817,6 @@ class RustBuild(object):
                 os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")]
         for _ in range(1, self.verbose):
             args.append("--verbose")
-        if self.use_locked_deps:
-            args.append("--locked")
-        if self.use_vendored_sources:
-            args.append("--frozen")
         run(args, env=env, verbose=self.verbose)
 
     def build_triple(self):
index 3fa77982a9ca38aecab94dac9a5c9dad685a5cc3..f60c7748ae32fde2dbad3c9b756d3c30ac03545d 100644 (file)
@@ -438,7 +438,6 @@ impl<'a> Builder<'a> {
                 doc::RustdocBook,
                 doc::RustByExample,
                 doc::RustcBook,
-                doc::CargoBook,
                 doc::EmbeddedBook,
                 doc::EditionGuide,
             ),
@@ -461,9 +460,7 @@ impl<'a> Builder<'a> {
                 dist::Miri,
                 dist::LlvmTools,
                 dist::RustDev,
-                dist::Extended,
                 dist::BuildManifest,
-                dist::HashSign
             ),
             Kind::Install => describe!(
                 install::Docs,
@@ -1315,10 +1312,7 @@ impl<'a> Builder<'a> {
             }
         }
 
-        if self.config.locked_deps {
-            cargo.arg("--locked");
-        }
-        if self.config.vendor || self.is_sudo {
+        if self.is_sudo {
             cargo.arg("--frozen");
         }
 
index aa670bd9a2e0c71e63a77b1b2586e8ad3d450277..01ecec928f5d7a838ad7bcbe8641685b2ceb4137 100644 (file)
@@ -60,7 +60,6 @@ macro_rules! book {
 // NOTE: When adding a book here, make sure to ALSO build the book by
 // adding a build step in `src/bootstrap/builder.rs`!
 book!(
-    CargoBook, "src/tools/cargo/src/doc", "cargo";
     EditionGuide, "src/doc/edition-guide", "edition-guide";
     EmbeddedBook, "src/doc/embedded-book", "embedded-book";
     Nomicon, "src/doc/nomicon", "nomicon";
index 00522ee6b673c4f940c1314e18fd5925d2a16846..b00d3ce1f1b9e1b5e3e668456976388bd64b45a5 100644 (file)
@@ -1543,14 +1543,7 @@ impl Step for RustcGuide {
     }
 
     fn run(self, builder: &Builder<'_>) {
-        let src = builder.src.join("src/doc/rustc-dev-guide");
-        let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook);
-        let toolstate = if try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src)) {
-            ToolState::TestPass
-        } else {
-            ToolState::TestFail
-        };
-        builder.save_toolstate("rustc-dev-guide", toolstate);
+        builder.save_toolstate("rustc-dev-guide", ToolState::TestPass);
     }
 }
 
index 2d10230ffcf7a9d49d4108501470a9da6fc7f4d3..4da5ae94ad958e015c4fdac2dd1a66faa586d06d 100644 (file)
@@ -87,7 +87,7 @@ accomplishing various tasks.
 
 ## The Cargo Book
 
-[The Cargo Book](cargo/index.html) is a guide to Cargo, Rust's build tool and dependency manager.
+[The Cargo Book](../../cargo-doc/doc/index.html) is a guide to Cargo, Rust's build tool and dependency manager.
 
 ## The Rustdoc Book
 
index 356705305d78b1af4a45b579bb50e7c59a33c561..7ef94abcacabdde9df1b44174a5fa4f90ae25a36 100644 (file)
@@ -372,8 +372,8 @@ fn check_crate_duplicate(metadata: &Metadata, bad: &mut bool) {
         // These two crates take quite a long time to build, so don't allow two versions of them
         // to accidentally sneak into our dependency graph, in order to ensure we keep our CI times
         // under control.
-        "cargo",
-        "rustc-ap-rustc_ast",
+        //"cargo",
+        //"rustc-ap-rustc_ast",
     ];
 
     for &name in FORBIDDEN_TO_HAVE_DUPLICATES {