From 9f0deba1a80d220a270bad8ece74cdce389c8b02 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Thu, 6 Aug 2020 21:11:39 +0100 Subject: [PATCH] Ignore submodules that we're not building, or that are unused like 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 | 28 ---------------------------- src/bootstrap/bootstrap.py | 4 ---- src/bootstrap/builder.rs | 8 +------- src/bootstrap/doc.rs | 1 - src/bootstrap/test.rs | 9 +-------- src/bootstrap/tool.rs | 4 ++-- src/doc/index.md | 2 +- src/tools/rustbook/Cargo.toml | 8 +------- src/tools/tidy/src/deps.rs | 4 ++-- 9 files changed, 8 insertions(+), 60 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f2177a99a9..cbfb106e79 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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", @@ -42,29 +33,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" } diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 8a2e354959..ea507ee35c 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -720,10 +720,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): diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index ffdd848518..68939f9b73 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -420,7 +420,6 @@ impl<'a> Builder<'a> { doc::RustdocBook, doc::RustByExample, doc::RustcBook, - doc::CargoBook, doc::EmbeddedBook, doc::EditionGuide, ), @@ -441,8 +440,6 @@ impl<'a> Builder<'a> { dist::Clippy, dist::Miri, dist::LlvmTools, - dist::Extended, - dist::HashSign ), Kind::Install => describe!( install::Docs, @@ -1255,10 +1252,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"); } diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index 5c01c5e852..60817d94bb 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -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"; diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index a99e39ed35..98a34f084d 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1532,14 +1532,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); } } diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 6cd9f9029c..97f33d7e27 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -277,14 +277,14 @@ pub fn prepare_tool_cargo( } fn rustbook_features() -> Vec { - 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 diff --git a/src/doc/index.md b/src/doc/index.md index 2d10230ffc..4da5ae94ad 100644 --- a/src/doc/index.md +++ b/src/doc/index.md @@ -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 diff --git a/src/tools/rustbook/Cargo.toml b/src/tools/rustbook/Cargo.toml index ff41197faa..29ba6897d6 100644 --- a/src/tools/rustbook/Cargo.toml +++ b/src/tools/rustbook/Cargo.toml @@ -6,22 +6,16 @@ license = "MIT OR Apache-2.0" edition = "2018" [features] -linkcheck = ["mdbook-linkcheck", "codespan-reporting", "codespan"] +linkcheck = [] [dependencies] clap = "2.25.0" failure = "0.1" -mdbook-linkcheck = { version = "0.5.0", optional = true } # Keep in sync with mdbook-linkcheck. codespan = { version = "0.5", optional = true } 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.7" default-features = false diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index c08f02b972..1cada585fa 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -360,8 +360,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 { -- 2.30.2