]> git.lizzy.rs Git - rust.git/commitdiff
Revert "Don't set `is_preview` for clippy and rustfmt"
authorJoshua Nelson <jnelson@cloudflare.com>
Sat, 26 Nov 2022 20:23:53 +0000 (15:23 -0500)
committerJoshua Nelson <jnelson@cloudflare.com>
Sat, 26 Nov 2022 20:24:46 +0000 (15:24 -0500)
This reverts commit fb3e724d7602675f147a9b80e70fb6bd6512738c, which broke `rustup update` for anyone with clippy or rustfmt installed.

src/bootstrap/dist.rs
src/bootstrap/download.rs
src/tools/build-manifest/src/versions.rs
src/tools/bump-stage0/src/main.rs

index a274d7b9aa1d3df2793feafdde7f9f61dcc4c5f9..2fef7f65827dd65c90e43c4b2141b964a4943fef 100644 (file)
@@ -1191,6 +1191,7 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
 
         let mut tarball = Tarball::new(builder, "clippy", &target.triple);
         tarball.set_overlay(OverlayKind::Clippy);
+        tarball.is_preview(true);
         tarball.add_file(clippy, "bin", 0o755);
         tarball.add_file(cargoclippy, "bin", 0o755);
         tarball.add_legal_and_readme_to("share/doc/clippy");
@@ -1288,6 +1289,7 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
             .expect("cargo fmt expected to build - essential tool");
         let mut tarball = Tarball::new(builder, "rustfmt", &target.triple);
         tarball.set_overlay(OverlayKind::Rustfmt);
+        tarball.is_preview(true);
         tarball.add_file(rustfmt, "bin", 0o755);
         tarball.add_file(cargofmt, "bin", 0o755);
         tarball.add_legal_and_readme_to("share/doc/rustfmt");
@@ -1548,6 +1550,8 @@ fn filter(contents: &str, marker: &str) -> String {
                     format!("{}-{}", name, target.triple)
                 } else if name == "rust-analyzer" {
                     "rust-analyzer-preview".to_string()
+                } else if name == "clippy" {
+                    "clippy-preview".to_string()
                 } else if name == "rust-demangler" {
                     "rust-demangler-preview".to_string()
                 } else if name == "miri" {
index 430b3496d007c7b0c0cffccacd4fbcfd1b7693a3..d0f389df973443346b452ddaa4415605c3efd011 100644 (file)
@@ -326,8 +326,6 @@ pub(crate) fn maybe_download_rustfmt(&self) -> Option<PathBuf> {
         }
 
         let filename = format!("rustfmt-{version}-{build}.tar.xz", build = host.triple);
-        // cfg(bootstrap): will need to be changed from `rustfmt-preview` to `rustfmt` the next time you run `bump-stage0`.
-        // See <https://github.com/rust-lang/rust/pull/103648>
         self.download_component(DownloadSource::Dist, filename, "rustfmt-preview", &date, "stage0");
 
         self.fix_bin_or_dylib(&bin_root.join("bin").join("rustfmt"));
index 66e6982d6b4d3c9941aef8c6b766e7e4193fd777..dde9745afb78564b9319c62894459ea0d40ec0fe 100644 (file)
@@ -49,10 +49,10 @@ pub(crate) fn all() -> &'static [PkgType] {
     Cargo = "cargo",
     HtmlDocs = "rust-docs",
     RustAnalysis = "rust-analysis",
-    Clippy = "clippy",
-    Rustfmt = "rustfmt",
     Rls = "rls"; preview = true,
     RustAnalyzer = "rust-analyzer"; preview = true,
+    Clippy = "clippy"; preview = true,
+    Rustfmt = "rustfmt"; preview = true,
     LlvmTools = "llvm-tools"; preview = true,
     Miri = "miri"; preview = true,
     JsonDocs = "rust-docs-json"; preview = true,
index 388203ee4637fb7b36dc0d98630d04f85bc25ae0..aa346daf7e5f3a4b99d45b8440aab47507b095e4 100644 (file)
@@ -6,7 +6,7 @@
 
 const PATH: &str = "src/stage0.json";
 const COMPILER_COMPONENTS: &[&str] = &["rustc", "rust-std", "cargo"];
-const RUSTFMT_COMPONENTS: &[&str] = &["rustfmt"];
+const RUSTFMT_COMPONENTS: &[&str] = &["rustfmt-preview"];
 
 struct Tool {
     config: Config,