Ignore submodules that we're not building, or that are unused like
authorXimin Luo <infinity0@debian.org>
Sat, 29 Aug 2020 15:54:36 +0000 (16:54 +0100)
committerXimin Luo <infinity0@debian.org>
Sat, 29 Aug 2020 15:54:36 +0000 (16:54 +0100)
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 be15e50e2bcca07d92d6615542914b4c0ba112f7..7e82bd98d39e00232ecdc3231618524286e03b10 100644 (file)
@@ -6,7 +6,6 @@ members = [
   "src/libtest",
   "src/librustc_codegen_llvm",
   "src/tools/cargotest",
-  "src/tools/clippy",
   "src/tools/compiletest",
   "src/tools/error_index_generator",
   "src/tools/linkchecker",
@@ -14,18 +13,10 @@ members = [
   "src/tools/unstable-book-gen",
   "src/tools/tidy",
   "src/tools/build-manifest",
-  "src/tools/remote-test-client",
-  "src/tools/remote-test-server",
   "src/tools/rust-installer",
-  "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",
@@ -55,29 +46,10 @@ overflow-checks = false
 # per-crate configuration isn't specifiable in the environment.
 codegen-units = 10000
 
-# 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.crates-io]
-# 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" }
-
-# 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 `tools/rustc-std-workspace-core/README.md` for what's going on
 # here
 rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' }
 rustc-std-workspace-alloc = { path = 'src/tools/rustc-std-workspace-alloc' }
 rustc-std-workspace-std = { path = 'src/tools/rustc-std-workspace-std' }
-
-[patch."https://github.com/rust-lang/rust-clippy"]
-clippy_lints = { path = "src/tools/clippy/clippy_lints" }
index 1e0ba26f3e5bb28d3b89d75aa361060d04991777..37b7b9332fdf5fa1c95d6d37668bd6f9b332a812 100644 (file)
@@ -726,10 +726,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 557fb1aa550a5862b70910fd697b2978c3595d58..c7061f8ca15fa95c04c5ae743147f4a964b22601 100644 (file)
@@ -446,7 +446,6 @@ impl<'a> Builder<'a> {
                 doc::RustdocBook,
                 doc::RustByExample,
                 doc::RustcBook,
-                doc::CargoBook,
                 doc::EmbeddedBook,
                 doc::EditionGuide,
             ),
@@ -468,8 +467,6 @@ impl<'a> Builder<'a> {
                 dist::Clippy,
                 dist::Miri,
                 dist::LlvmTools,
-                dist::Extended,
-                dist::HashSign
             ),
             Kind::Install => describe!(
                 install::Docs,
@@ -1300,10 +1297,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 582bc9da0e804d4838da8b343b9f21de04957f9a..6e5960725f0221e068a3ca7dcbe1d62a61b2fa32 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 1916d96bed71dba0632b9881504bebd2c8a59725..c20f2142a1be0ee0ec165217beb37b935daa09f3 100644 (file)
@@ -1529,14 +1529,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 b7d3d428cd28340aa3ace9124f6c08885fd061a8..e2edfaf57dbeaaab4c992b106a0fffbdb30b3c0a 100644 (file)
@@ -353,8 +353,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 {