From: Debian Rust Maintainers Date: Sat, 2 Oct 2021 00:07:59 +0000 (+0100) Subject: d-0000-ignore-removed-submodules X-Git-Tag: archive/raspbian/1.82.0+dfsg1-2+rpi1^2~35 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=79a2f1200d62fe45314e7760084772aef2d12d87;p=rustc.git d-0000-ignore-removed-submodules 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 --- diff --git a/Cargo.toml b/Cargo.toml index d4b84250fc..7610ad10c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,21 +18,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/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/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", diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 71f69e03a9..2462aa1200 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -1024,10 +1024,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") diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 84a6b26a49..ac210ab305 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -2409,15 +2409,7 @@ impl Step for RustcGuide { } fn run(self, builder: &Builder<'_>) { - let relative_path = "src/doc/rustc-dev-guide"; - builder.require_submodule(relative_path, None); - - let src = builder.src.join(relative_path); - let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook).delay_failure(); - rustbook_cmd.arg("linkcheck").arg(&src); - let toolstate = - if rustbook_cmd.run(builder) { ToolState::TestPass } else { ToolState::TestFail }; - builder.save_toolstate("rustc-dev-guide", toolstate); + builder.save_toolstate("rustc-dev-guide", ToolState::TestPass); } } diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs index ff0d1f3a72..6e3efebd25 100644 --- a/src/bootstrap/src/core/builder.rs +++ b/src/bootstrap/src/core/builder.rs @@ -782,24 +782,13 @@ 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::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, @@ -839,12 +828,7 @@ impl<'a> Builder<'a> { check::Rustdoc, check::CodegenBackend, check::Clippy, - check::Miri, - check::CargoMiri, - check::MiroptTestTools, - check::Rls, check::Rustfmt, - check::RustAnalyzer, check::TestFloatParse, check::Bootstrap, ), @@ -878,7 +862,6 @@ impl<'a> Builder<'a> { test::TierCheck, test::Cargotest, test::Cargo, - test::RustAnalyzer, test::ErrorIndex, test::Distcheck, test::Nomicon, @@ -893,8 +876,6 @@ impl<'a> Builder<'a> { test::EmbeddedBook, test::EditionGuide, test::Rustfmt, - test::Miri, - test::CargoMiri, test::Clippy, test::CompiletestTest, test::CrateRunMakeSupport, @@ -934,7 +915,6 @@ impl<'a> Builder<'a> { doc::CargoBook, doc::Clippy, doc::ClippyBook, - doc::Miri, doc::EmbeddedBook, doc::EditionGuide, doc::StyleGuide, @@ -955,11 +935,8 @@ impl<'a> Builder<'a> { dist::Analysis, dist::Src, dist::Cargo, - dist::Rls, - dist::RustAnalyzer, dist::Rustfmt, dist::Clippy, - dist::Miri, dist::LlvmTools, dist::LlvmBitcodeLinker, dist::RustDev, @@ -982,10 +959,8 @@ 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::Clippy, - install::Miri, install::LlvmTools, install::Src, ), @@ -993,7 +968,6 @@ impl<'a> Builder<'a> { run::BuildManifest, run::BumpStage0, run::ReplaceVersionPlaceholder, - run::Miri, run::CollectLicenseMetadata, run::GenerateCopyright, run::GenerateWindowsSys, @@ -2138,10 +2112,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/tools/build_helper/src/util.rs b/src/tools/build_helper/src/util.rs index 72c05c4c48..3be35b7dd8 100644 --- a/src/tools/build_helper/src/util.rs +++ b/src/tools/build_helper/src/util.rs @@ -52,24 +52,5 @@ pub fn try_run(cmd: &mut Command, print_cmd_on_fail: bool) -> Result<(), ()> { /// Returns the submodule paths from the `.gitmodules` file in the given directory. pub fn parse_gitmodules(target_dir: &Path) -> &[String] { - static SUBMODULES_PATHS: OnceLock> = OnceLock::new(); - let gitmodules = target_dir.join(".gitmodules"); - assert!(gitmodules.exists(), "'{}' file is missing.", gitmodules.display()); - - let init_submodules_paths = || { - let file = File::open(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()); - } - } - - submodules_paths - }; - - SUBMODULES_PATHS.get_or_init(|| init_submodules_paths()) + return &[]; } diff --git a/src/tools/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/Cargo.toml index aa7bd2dc5f..558a43bca9 100644 --- a/src/tools/rust-analyzer/Cargo.toml +++ b/src/tools/rust-analyzer/Cargo.toml @@ -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"