Description: Ignore submodules that we're not building, or that are unused like mdbook-linkcheck that pull in a ton of dependencies that are unneeded. Author: Ximin Luo Forwarded: not-needed --- a/Cargo.toml +++ b/Cargo.toml @@ -16,23 +16,12 @@ "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 +70,8 @@ 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 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -893,10 +893,6 @@ 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): --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -447,7 +447,6 @@ doc::RustdocBook, doc::RustByExample, doc::RustcBook, - doc::CargoBook, doc::EmbeddedBook, doc::EditionGuide, ), @@ -470,7 +469,6 @@ dist::Miri, dist::LlvmTools, dist::RustDev, - dist::Extended, dist::BuildManifest, dist::ReproducibleArtifacts, ), @@ -1456,10 +1454,7 @@ } } - if self.config.locked_deps { - cargo.arg("--locked"); - } - if self.config.vendor || self.is_sudo { + if self.is_sudo { cargo.arg("--frozen"); } --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -60,7 +60,6 @@ // 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"; --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1642,14 +1642,7 @@ } 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); } } --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -374,8 +374,8 @@ // 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 { --- a/src/tools/rustfmt/Cargo.toml +++ b/src/tools/rustfmt/Cargo.toml @@ -43,10 +43,10 @@ term = "0.6" diff = "0.1" log = "0.4" -env_logger = "0.6" +env_logger = "0.7" getopts = "0.2" derive-new = "0.5" -cargo_metadata = "0.8" +cargo_metadata = "0.11" bytecount = "0.6" unicode-width = "0.1.5" unicode_categories = "0.1.1" @@ -59,11 +59,6 @@ anyhow = "1.0" thiserror = "1.0" -# 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.rustc_ast] package = "rustc-ap-rustc_ast" version = "705.0.0" --- a/src/tools/rustfmt/src/cargo-fmt/main.rs +++ b/src/tools/rustfmt/src/cargo-fmt/main.rs @@ -529,7 +529,7 @@ if let Some(manifest_path) = manifest_path { cmd.manifest_path(manifest_path); } - cmd.other_options(&[String::from("--offline")]); + cmd.other_options(vec![String::from("--offline")]); match cmd.exec() { Ok(metadata) => Ok(metadata), --- a/src/tools/clippy/Cargo.toml +++ b/src/tools/clippy/Cargo.toml @@ -38,11 +38,6 @@ derive-new = "0.5" regex = "1.4" -# 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" - [build-dependencies] rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util" }