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, 27 Jun 2024 12:30:53 +0000 (14:30 +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 1379e4cd3bfdbaec2c952d198d99593b02e3407a..37150f2bf2b9647b0d21dc764c31f0c4591735d8 100644 (file)
@@ -20,23 +20,16 @@ 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/llvm-bitcode-linker",
   "src/tools/html-checker",
-  "src/tools/bump-stage0",
   "src/tools/replace-version-placeholder",
   "src/tools/lld-wrapper",
   "src/tools/collect-license-metadata",
index e464e444fea2011df6ee021dbd50e7afdc5e52a1..e176c4c0fcc810f4d6b016d1e12f15c8cffe5594 100644 (file)
@@ -991,10 +991,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 411ed99532f7cb1538e09273517feb73d0a0302d..2b8f1d161cf63c1d4385b5158349e22ad4e5881c 100644 (file)
@@ -2472,17 +2472,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 d0d9b1c4aeb16dcdef34493f8cffec7ddd4df67b..19691dd5e939552c76f858cf268fd45eb6d210e6 100644 (file)
@@ -724,25 +724,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,
                 tool::LlvmBitcodeLinker
@@ -781,12 +770,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!(
@@ -820,7 +804,6 @@ impl<'a> Builder<'a> {
                 test::TierCheck,
                 test::Cargotest,
                 test::Cargo,
-                test::RustAnalyzer,
                 test::ErrorIndex,
                 test::Distcheck,
                 test::RunMakeFullDeps,
@@ -836,8 +819,6 @@ impl<'a> Builder<'a> {
                 test::EmbeddedBook,
                 test::EditionGuide,
                 test::Rustfmt,
-                test::Miri,
-                test::CargoMiri,
                 test::Clippy,
                 test::RustDemangler,
                 test::CompiletestTest,
@@ -876,7 +857,6 @@ impl<'a> Builder<'a> {
                 doc::CargoBook,
                 doc::Clippy,
                 doc::ClippyBook,
-                doc::Miri,
                 doc::EmbeddedBook,
                 doc::EditionGuide,
                 doc::StyleGuide,
@@ -896,12 +876,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::LlvmBitcodeLinker,
                 dist::RustDev,
@@ -924,11 +901,9 @@ impl<'a> Builder<'a> {
                 // install the same binaries twice for each tool, leaving backup files (*.old) as a result.
                 install::Rustc,
                 install::Cargo,
-                install::RustAnalyzer,
                 install::Rustfmt,
                 install::RustDemangler,
                 install::Clippy,
-                install::Miri,
                 install::LlvmTools,
                 install::Src,
             ),
@@ -937,7 +912,6 @@ impl<'a> Builder<'a> {
                 run::BuildManifest,
                 run::BumpStage0,
                 run::ReplaceVersionPlaceholder,
-                run::Miri,
                 run::CollectLicenseMetadata,
                 run::GenerateCopyright,
                 run::GenerateWindowsSys,
@@ -2076,10 +2050,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");
         }
 
@@ -2231,16 +2202,16 @@ impl<'a> Builder<'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().map_while(Result::ok) {
-                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().map_while(Result::ok) {
+            //    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
         };
index f7e3ae51dfd0000de3567bc2287191915453fb0f..771ae2a40c74f2312fb30edeed4c444930fd5631 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"