Ignore submodules that we're not building, or that are unused like
authorXimin Luo <infinity0@debian.org>
Fri, 10 Apr 2020 10:33:25 +0000 (11:33 +0100)
committerXimin Luo <infinity0@debian.org>
Fri, 10 Apr 2020 10:33:25 +0000 (11:33 +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/bootstrap/tool.rs
src/doc/index.md
src/tools/rustbook/Cargo.toml
src/tools/tidy/src/deps.rs

index 9d5c27b96df5d435daaded1ece44d1c8b6b613c1..44cbd550fa425040227ecd904fea1de2b4aca6f4 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,14 +13,8 @@ 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/rustdoc-themes",
   "src/tools/unicode-table-generator",
 ]
@@ -47,29 +40,10 @@ debug-assertions = false
 debug = false
 debug-assertions = false
 
-# 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 32f65c3be4c244163f01176384c0188072707e59..6e669a9c1b40ede4d9c762693c1ba8a741dae0af 100644 (file)
@@ -705,10 +705,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 d9c894aa9c6b1d6a32023c99201e01528246b3cd..2374278e1feba046346d10e4fffb9c2c48c14555 100644 (file)
@@ -417,7 +417,6 @@ impl<'a> Builder<'a> {
                 doc::RustdocBook,
                 doc::RustByExample,
                 doc::RustcBook,
-                doc::CargoBook,
                 doc::EmbeddedBook,
                 doc::EditionGuide,
             ),
@@ -439,8 +438,6 @@ impl<'a> Builder<'a> {
                 dist::Miri,
                 dist::LlvmTools,
                 dist::Lldb,
-                dist::Extended,
-                dist::HashSign
             ),
             Kind::Install => describe!(
                 install::Docs,
@@ -1177,10 +1174,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 204056598d9004882914c0cc1f8cf4980f8f235f..fed8456d7d157ad066f8f4ab717050c7d75f32aa 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 659a308d5b93faf3f98d05d9922af8d7077563b0..fea2f33a614831ea0e981180bf6946fc221dccf0 100644 (file)
@@ -1472,14 +1472,14 @@ impl Step for RustcGuide {
     }
 
     fn run(self, builder: &Builder<'_>) {
-        let src = builder.src.join("src/doc/rustc-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-guide", toolstate);
+        //let src = builder.src.join("src/doc/rustc-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-guide", ToolState::TestPass);
     }
 }
 
index 7f24768a4f10e54cce459ab65dc2af4f46134f0f..7230f359fab5a47699e26c815256c51a257b21f0 100644 (file)
@@ -273,14 +273,14 @@ pub fn prepare_tool_cargo(
 }
 
 fn rustbook_features() -> Vec<String> {
-    let mut features = Vec::new();
+    let features = Vec::new();
 
     // Due to CI budged and risk of spurious failures we want to limit jobs running this check.
     // At same time local builds should run it regardless of the platform.
     // `CiEnv::None` means it's local build and `CHECK_LINKS` is defined in x86_64-gnu-tools to
     // explicitly enable it on single job
     if CiEnv::current() == CiEnv::None || env::var("CHECK_LINKS").is_ok() {
-        features.push("linkcheck".to_string());
+    //    features.push("linkcheck".to_string());
     }
 
     features
index 0a2a80e8fd6e2b4d62dcf9a93f2dc5983b0da249..5861a0d1866c257dd6822c386b7b4a5c80244fd9 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 327de29037cc33aed28b92c9f1c617e0100fbb35..bc9ce5f92c2493889742aa2bac728d04c3cb6707 100644 (file)
@@ -6,21 +6,15 @@ license = "MIT OR Apache-2.0"
 edition = "2018"
 
 [features]
-linkcheck = ["mdbook-linkcheck", "codespan-reporting"]
+linkcheck = []
 
 [dependencies]
 clap = "2.25.0"
 failure = "0.1"
-mdbook-linkcheck = { version = "0.5.0", optional = true }
 # Keep in sync with mdbook-linkcheck.
 codespan-reporting = { version = "0.5", optional = true }
 
 
-# A noop dependency that changes in the Rust repository, it's a bit of a hack.
-# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
-# for more information.
-rustc-workspace-hack = "1.0.0"
-
 [dependencies.mdbook]
 version = "0.3.0"
 default-features = false
index 352c00dbe41bd99c6ef7dcb79e74e1d0fd36351a..7b2a22e1a64cef0564c92269e4a2aa02248ac52e 100644 (file)
@@ -406,8 +406,8 @@ fn check_crate_duplicate(resolve: &Resolve, 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-syntax",
+        //"cargo",
+        //"rustc-ap-syntax",
     ];
     let mut name_to_id: HashMap<_, Vec<_>> = HashMap::new();
     for node in resolve.nodes.iter() {