d-0000-ignore-removed-submodules
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sat, 2 Oct 2021 00:07:59 +0000 (01:07 +0100)
committerEmilio Pozuelo Monfort <pochu@debian.org>
Fri, 28 Jul 2023 11:44:06 +0000 (12:44 +0100)
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/tools/clippy/Cargo.toml
src/tools/rustfmt/Cargo.toml
src/tools/tidy/src/deps.rs

index 4e78399606445837adb68b0d7b0789c77a218a03..4a87674b02aadb081ad84c60bfe9f53aa145f229 100644 (file)
@@ -18,25 +18,14 @@ 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",
   "src/tools/html-checker",
-  "src/tools/bump-stage0",
   "src/tools/lld-wrapper",
 ]
 
@@ -106,25 +95,7 @@ debug = 0
 # Only use debuginfo=1 to further reduce compile times.
 bootstrap.debug = 1
 
-# 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" }
-cargo-util = { path = "src/tools/cargo/crates/cargo-util" }
-
-[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
index ac5cb076b538e343c9b9909aaa93f3eeeb3ed5c8..928e9395229705627d748482ee1354a000bc1e57 100644 (file)
@@ -793,10 +793,6 @@ class RustBuild(object):
                 os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")]
         for _ in range(0, self.verbose):
             args.append("--verbose")
-        if self.use_locked_deps:
-            args.append("--locked")
-        if self.use_vendored_sources:
-            args.append("--frozen")
         if self.get_toml("metrics", "build"):
             args.append("--features")
             args.append("build-metrics")
@@ -854,17 +850,6 @@ class RustBuild(object):
     def update_submodules(self):
         """Update submodules"""
         has_git = os.path.exists(os.path.join(self.rust_root, ".git"))
-        # This just arbitrarily checks for cargo, but any workspace member in
-        # a submodule would work.
-        has_submodules = os.path.exists(os.path.join(self.rust_root, "src/tools/cargo/Cargo.toml"))
-        if not has_git and not has_submodules:
-            print("This is not a git repository, and the requisite git submodules were not found.")
-            print("If you downloaded the source from https://github.com/rust-lang/rust/releases,")
-            print("those sources will not work. Instead, consider downloading from the source")
-            print("releases linked at")
-            print("https://forge.rust-lang.org/infra/other-installation-methods.html#source-code")
-            print("or clone the repository at https://github.com/rust-lang/rust/.")
-            raise SystemExit(1)
         if not has_git or self.get_toml('submodules') == "false":
             return
 
index 62b5416cee8af011605dd4ff05011826ad4f9161..144aefa2c213b7502183af8fce996f3e6f775de6 100644 (file)
@@ -692,7 +692,6 @@ impl<'a> Builder<'a> {
                 doc::RustdocBook,
                 doc::RustByExample,
                 doc::RustcBook,
-                doc::CargoBook,
                 doc::Clippy,
                 doc::EmbeddedBook,
                 doc::EditionGuide,
@@ -715,7 +714,6 @@ impl<'a> Builder<'a> {
                 dist::Miri,
                 dist::LlvmTools,
                 dist::RustDev,
-                dist::Extended,
                 // It seems that PlainSourceTarball somehow changes how some of the tools
                 // perceive their dependencies (see #93033) which would invalidate fingerprints
                 // and force us to rebuild tools after vendoring dependencies.
@@ -2049,10 +2047,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 be6655ddb61d0883bbe5396f99b89a5b424d8d30..91e0772b26406c2c9a60c3fa2e98bdb953cd2463 100644 (file)
@@ -73,7 +73,6 @@ macro_rules! book {
 // FIXME: Make checking for a submodule automatic somehow (maybe by having a list of all submodules
 // and checking against it?).
 book!(
-    CargoBook, "src/tools/cargo/src/doc", "cargo", submodule = "src/tools/cargo";
     EditionGuide, "src/doc/edition-guide", "edition-guide", submodule;
     EmbeddedBook, "src/doc/embedded-book", "embedded-book", submodule;
     Nomicon, "src/doc/nomicon", "nomicon", submodule;
index 9958306b5765cf64e4d72889ce7b1e6a8973c7b9..4e4945b0af7a2c6dfe7c1ce9d4ebad749af437e9 100644 (file)
@@ -1842,17 +1842,7 @@ impl Step for RustcGuide {
     }
 
     fn run(self, builder: &Builder<'_>) {
-        let relative_path = Path::new("src").join("doc").join("rustc-dev-guide");
-        builder.update_submodule(&relative_path);
-
-        let src = builder.src.join(relative_path);
-        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 e4060ce29a7b55302f470975c379db2845668b50..a86a9e6791c6355f6c85e89b7b2c4af76d0c4a99 100644 (file)
@@ -34,11 +34,6 @@ regex = "1.5"
 # This is used by the `collect-metadata` alias.
 filetime = "0.2"
 
-# 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"
-
 # UI test dependencies
 clippy_utils = { path = "clippy_utils" }
 derive-new = "0.5"
index 7a4e02d69eddc05f7db59d35654d812b89031669..27b91f25d78b5d6137090bb5ed9b94e199d8cbe7 100644 (file)
@@ -59,11 +59,6 @@ unicode_categories = "0.1"
 
 rustfmt-config_proc_macro = { version = "0.2", path = "config_proc_macro" }
 
-# 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"
-
 # Rustc dependencies are loaded from the sysroot, Cargo doesn't know about them.
 
 [package.metadata.rust-analyzer]
index 7775bbb13e88a02aad8e5150fcdbd47ea0b944d2..ae0489e17ae90871b294af8d60b05c760eed5be3 100644 (file)
@@ -294,7 +294,7 @@ const FORBIDDEN_TO_HAVE_DUPLICATES: &[&str] = &[
     // 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",
+    //"cargo",
 ];
 
 /// Dependency checks.