From 9dedc8c95d13a3e10c002818d6a717176e9705be Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Sun, 19 Sep 2021 19:48:33 +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 | 31 ------------------------------- src/bootstrap/bootstrap.py | 4 ---- src/bootstrap/builder.rs | 7 +------ src/bootstrap/doc.rs | 1 - src/bootstrap/test.rs | 9 +-------- src/doc/index.md | 2 +- src/tools/tidy/src/deps.rs | 4 ++-- 7 files changed, 5 insertions(+), 53 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f961d3e9b..8b8d2250e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ members = [ "library/test", "src/rustdoc-json-types", "src/tools/cargotest", - "src/tools/clippy", "src/tools/compiletest", "src/tools/error_index_generator", "src/tools/linkchecker", @@ -16,23 +15,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/cargo/crates/credential/cargo-credential-1password", - "src/tools/cargo/crates/credential/cargo-credential-macos-keychain", - "src/tools/cargo/crates/credential/cargo-credential-wincred", "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", - "src/tools/jsondocck", ] exclude = [ @@ -81,24 +68,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 @@ -106,5 +77,3 @@ rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' } rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' } rustc-std-workspace-std = { path = 'library/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 6e4c38797..5b283229b 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -848,10 +848,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 05dcae797..a99159b18 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -445,7 +445,6 @@ impl<'a> Builder<'a> { doc::RustdocBook, doc::RustByExample, doc::RustcBook, - doc::CargoBook, doc::EmbeddedBook, doc::EditionGuide, ), @@ -468,7 +467,6 @@ impl<'a> Builder<'a> { dist::Miri, dist::LlvmTools, dist::RustDev, - dist::Extended, dist::BuildManifest, dist::ReproducibleArtifacts, ), @@ -1437,10 +1435,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 c4b3e4cf9..fa42fa394 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 d9132f20d..694d41085 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1553,14 +1553,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/doc/index.md b/src/doc/index.md index 2c92d5e2a..9be58d5aa 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/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index f12708672..b7e865efd 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -370,8 +370,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