summaryrefslogtreecommitdiffstats
path: root/debian/patches/d-0000-ignore-removed-submodules.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/d-0000-ignore-removed-submodules.patch253
1 files changed, 253 insertions, 0 deletions
diff --git a/debian/patches/d-0000-ignore-removed-submodules.patch b/debian/patches/d-0000-ignore-removed-submodules.patch
new file mode 100644
index 000000000..3dfaf06cb
--- /dev/null
+++ b/debian/patches/d-0000-ignore-removed-submodules.patch
@@ -0,0 +1,253 @@
+From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+Date: Sat, 2 Oct 2021 01:07:59 +0100
+Subject: d-0000-ignore-removed-submodules
+
+---
+ Cargo.toml | 36 ++++++++----------------------------
+ src/bootstrap/bootstrap.py | 4 ----
+ src/bootstrap/builder.rs | 7 +------
+ src/bootstrap/doc.rs | 1 -
+ src/bootstrap/test.rs | 12 +-----------
+ src/tools/clippy/Cargo.toml | 5 -----
+ src/tools/rustfmt/Cargo.toml | 5 -----
+ src/tools/tidy/src/deps.rs | 2 +-
+ 8 files changed, 11 insertions(+), 61 deletions(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index ffc886d..7231b60 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -16,25 +16,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",
+ ]
+
+@@ -96,25 +85,16 @@ gimli.debug = 0
+ 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" }
+-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" }
++# The only package that ever uses debug builds is bootstrap.
++# We care a lot about bootstrap's compile times, so don't include debug info for
++# dependencies, only bootstrap itself.
++[profile.dev]
++debug = 0
++[profile.dev.package]
++# Only use debuginfo=1 to further reduce compile times.
++bootstrap.debug = 1
+
+ [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
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 03eec02..c40811f 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -759,10 +759,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")
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index 0ab4824..629e1bb 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -600,7 +600,6 @@ impl<'a> Builder<'a> {
+ tool::RustInstaller,
+ tool::Cargo,
+ tool::Rls,
+- tool::RustAnalyzer,
+ tool::RustAnalyzerProcMacroSrv,
+ tool::RustDemangler,
+ tool::Rustdoc,
+@@ -622,7 +620,6 @@ impl<'a> Builder<'a> {
+ check::Clippy,
+ check::Miri,
+ check::Rls,
+- check::RustAnalyzer,
+ check::Rustfmt,
+ check::Bootstrap
+ ),
+@@ -650,7 +647,6 @@ impl<'a> Builder<'a> {
+ test::Cargotest,
+ test::Cargo,
+ test::Rls,
+- test::RustAnalyzer,
+ test::ErrorIndex,
+ test::Distcheck,
+ test::RunMakeFullDeps,
+@@ -698,10 +694,8 @@ impl<'a> Builder<'a> {
+ doc::RustdocBook,
+ doc::RustByExample,
+ doc::RustcBook,
+- doc::CargoBook,
+ doc::Clippy,
+ doc::ClippyBook,
+- doc::Miri,
+ doc::EmbeddedBook,
+ doc::EditionGuide,
+ ),
+@@ -723,7 +717,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.
+@@ -2054,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");
+ }
+
+diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
+index 2852442..5faa8e5 100644
+--- a/src/bootstrap/doc.rs
++++ b/src/bootstrap/doc.rs
+@@ -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";
+ ClippyBook, "src/tools/clippy/book", "clippy";
+ EditionGuide, "src/doc/edition-guide", "edition-guide", submodule;
+ EmbeddedBook, "src/doc/embedded-book", "embedded-book", submodule;
+diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
+index c0fa8c9..8fbc390 100644
+--- a/src/bootstrap/test.rs
++++ b/src/bootstrap/test.rs
+@@ -1910,17 +1910,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);
+ }
+ }
+
+diff --git a/src/tools/clippy/Cargo.toml b/src/tools/clippy/Cargo.toml
+index 1c875c3..1aad7cf 100644
+--- a/src/tools/clippy/Cargo.toml
++++ b/src/tools/clippy/Cargo.toml
+@@ -36,11 +36,6 @@ walkdir = "2.3"
+ # 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"
+diff --git a/src/tools/rustfmt/Cargo.toml b/src/tools/rustfmt/Cargo.toml
+index 7a4e02d..27b91f2 100644
+--- a/src/tools/rustfmt/Cargo.toml
++++ b/src/tools/rustfmt/Cargo.toml
+@@ -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]
+diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
+index 333f85f..4df2b54 100644
+--- a/src/tools/tidy/src/deps.rs
++++ b/src/tools/tidy/src/deps.rs
+@@ -306,7 +306,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.
+diff --git a/src/tools/rust-analyzer/Cargo.toml b/src.tools/rust-analyzer/Cargo.toml
+index 6b68ca82389..7bc5d1bc5a0 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-test/imp"]
+
+ [profile.dev]