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)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Thu, 20 Jun 2024 11:40:40 +0000 (13:40 +0200)
Description: remove upstream parts that are not needed for the Debian build, in
order to both reduce the orig tarball and the vendored crates within.

Forwarded: not-needed

Gbp-Pq: Topic prune
Gbp-Pq: Name d-0000-ignore-removed-submodules.patch

Cargo.toml
src/bootstrap/bootstrap.py
src/bootstrap/src/core/build_steps/test.rs
src/bootstrap/src/core/builder.rs
src/tools/rust-analyzer/Cargo.toml

index 2ea16c22666157a5835bf9a5ee53a0d25811a107..2657b909a13471dace4ba296f74cb5d04c1c0009 100644 (file)
@@ -19,22 +19,15 @@ 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/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/jsondoclint",
   "src/tools/html-checker",
-  "src/tools/bump-stage0",
   "src/tools/replace-version-placeholder",
   "src/tools/lld-wrapper",
   "src/tools/collect-license-metadata",
index 0d604c0d3e5e0da4367259071d958d67a2f2359a..1aa417351425172f43395e0559f66c2fd0ca8d8b 100644 (file)
@@ -983,10 +983,6 @@ class RustBuild(object):
         args = [self.cargo(), "build", "--manifest-path",
                 os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")]
         args.extend("--verbose" for _ in range(self.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")
index 04728e2e00dcce4839c1263c182256c56463a39c..48838c72e4053dfbcbb04aea0b39cecf1d43c669 100644 (file)
@@ -2322,17 +2322,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 builder.run_delaying_failure(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 dac8393de6b4c7c6852524069f3c0fad564eac3f..58f12f98ced57977d55f50ab2140fc438a29cc65 100644 (file)
@@ -511,20 +511,20 @@ impl<'a> ShouldRun<'a> {
         static SUBMODULES_PATHS: OnceLock<Vec<String>> = OnceLock::new();
 
         let init_submodules_paths = |src: &PathBuf| {
-            let file = File::open(src.join(".gitmodules")).unwrap();
+            //let file = File::open(src.join(".gitmodules")).unwrap();
 
             let mut submodules_paths = vec![];
-            for line in BufReader::new(file).lines() {
-                if let Ok(line) = line {
-                    let line = line.trim();
-
-                    if line.starts_with("path") {
-                        let actual_path =
-                            line.split(' ').last().expect("Couldn't get value of path");
-                        submodules_paths.push(actual_path.to_owned());
-                    }
-                }
-            }
+            //for line in BufReader::new(file).lines() {
+            //    if let Ok(line) = line {
+            //        let line = line.trim();
+
+            //        if line.starts_with("path") {
+            //            let actual_path =
+            //                line.split(' ').last().expect("Couldn't get value of path");
+            //            submodules_paths.push(actual_path.to_owned());
+            //        }
+            //    }
+            //}
 
             submodules_paths
         };
@@ -698,25 +698,14 @@ impl<'a> Builder<'a> {
                 tool::Linkchecker,
                 tool::CargoTest,
                 tool::Compiletest,
-                tool::RemoteTestServer,
-                tool::RemoteTestClient,
                 tool::RustInstaller,
                 tool::Cargo,
-                tool::Rls,
-                tool::RustAnalyzer,
                 tool::RustAnalyzerProcMacroSrv,
                 tool::RustDemangler,
                 tool::Rustdoc,
                 tool::Clippy,
                 tool::CargoClippy,
-                llvm::Llvm,
-                llvm::Sanitizers,
                 tool::Rustfmt,
-                tool::Miri,
-                tool::CargoMiri,
-                llvm::Lld,
-                llvm::CrtBeginEnd,
-                tool::RustdocGUITest,
                 tool::OptimizedDist,
                 tool::CoverageDump,
             ),
@@ -726,12 +715,7 @@ impl<'a> Builder<'a> {
                 check::Rustdoc,
                 check::CodegenBackend,
                 check::Clippy,
-                check::Miri,
-                check::CargoMiri,
-                check::MiroptTestTools,
-                check::Rls,
                 check::Rustfmt,
-                check::RustAnalyzer,
                 check::Bootstrap
             ),
             Kind::Test => describe!(
@@ -764,7 +748,6 @@ impl<'a> Builder<'a> {
                 test::TierCheck,
                 test::Cargotest,
                 test::Cargo,
-                test::RustAnalyzer,
                 test::ErrorIndex,
                 test::Distcheck,
                 test::RunMakeFullDeps,
@@ -780,7 +763,6 @@ impl<'a> Builder<'a> {
                 test::EmbeddedBook,
                 test::EditionGuide,
                 test::Rustfmt,
-                test::Miri,
                 test::Clippy,
                 test::RustDemangler,
                 test::CompiletestTest,
@@ -817,7 +799,6 @@ impl<'a> Builder<'a> {
                 doc::CargoBook,
                 doc::Clippy,
                 doc::ClippyBook,
-                doc::Miri,
                 doc::EmbeddedBook,
                 doc::EditionGuide,
                 doc::StyleGuide,
@@ -837,12 +818,9 @@ impl<'a> Builder<'a> {
                 dist::Analysis,
                 dist::Src,
                 dist::Cargo,
-                dist::Rls,
-                dist::RustAnalyzer,
                 dist::Rustfmt,
                 dist::RustDemangler,
                 dist::Clippy,
-                dist::Miri,
                 dist::LlvmTools,
                 dist::RustDev,
                 dist::Bootstrap,
@@ -859,11 +837,9 @@ impl<'a> Builder<'a> {
                 install::Docs,
                 install::Std,
                 install::Cargo,
-                install::RustAnalyzer,
                 install::Rustfmt,
                 install::RustDemangler,
                 install::Clippy,
-                install::Miri,
                 install::LlvmTools,
                 install::Src,
                 install::Rustc
@@ -873,7 +849,6 @@ impl<'a> Builder<'a> {
                 run::BuildManifest,
                 run::BumpStage0,
                 run::ReplaceVersionPlaceholder,
-                run::Miri,
                 run::CollectLicenseMetadata,
                 run::GenerateCopyright,
                 run::GenerateWindowsSys,
@@ -2082,10 +2057,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 56db5a28c08a336daa54e64a3c718f91f415d8b5..abe2437054fe74a6de112567a98ddff4ba1d121e 100644 (file)
@@ -1,5 +1,14 @@
 [workspace]
-members = ["xtask/", "lib/*", "crates/*"]
+members = [
+  "xtask/",
+  "lib/*",
+  "crates/proc-macro-srv",
+  "crates/proc-macro-srv-cli",
+  "crates/tt",
+  "crates/mbe",
+  "crates/paths",
+  "crates/proc-macro-api",
+]
 exclude = ["crates/proc-macro-srv/proc-macro-test/imp"]
 resolver = "2"