Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let rust-analyzer ship on stable, non-preview #98640

Merged
merged 2 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1044,12 +1044,6 @@ impl Step for RustAnalyzer {
}

fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
// This prevents rust-analyzer from being built for "dist" or "install"
// on the stable/beta channels. It is a nightly-only tool and should
// not be included.
if !builder.build.unstable_features() {
return None;
}
let compiler = self.compiler;
let target = self.target;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a tarball.is_preview below that needs updating I think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, but cause the actual component remains "*-preview" for the purpose of rustup updates, while the new rename is basically just an alias. We have the same thing still set on all formerly-preview components, even rustfmt.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, interesting. We should consider if there's a way to migrate, feels off that we need to keep what seems like the canonical name the same. Maybe the renames need to be in the other direction or something too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe so, but we'll need to work with rustup folks to be sure the upgrade path works.

Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ tool_extended!((self, builder),
// and this is close enough for now.
RustDemangler, rust_demangler, "src/tools/rust-demangler", "rust-demangler", stable=false, in_tree=true, tool_std=true, {};
Rustfmt, rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, in_tree=true, {};
RustAnalyzer, rust_analyzer, "src/tools/rust-analyzer/crates/rust-analyzer", "rust-analyzer", stable=false, submodule="rust-analyzer", {};
RustAnalyzer, rust_analyzer, "src/tools/rust-analyzer/crates/rust-analyzer", "rust-analyzer", stable=true, submodule="rust-analyzer", {};
);

impl<'a> Builder<'a> {
Expand Down
3 changes: 2 additions & 1 deletion src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static PKG_INSTALLERS: &[&str] = &["x86_64-apple-darwin", "aarch64-apple-darwin"

static MINGW: &[&str] = &["i686-pc-windows-gnu", "x86_64-pc-windows-gnu"];

static NIGHTLY_ONLY_COMPONENTS: &[&str] = &["miri-preview", "rust-analyzer-preview"];
static NIGHTLY_ONLY_COMPONENTS: &[&str] = &["miri-preview"];

macro_rules! t {
($e:expr) => {
Expand Down Expand Up @@ -403,6 +403,7 @@ impl Builder {
rename("rustfmt", "rustfmt-preview");
rename("clippy", "clippy-preview");
rename("miri", "miri-preview");
rename("rust-analyzer", "rust-analyzer-preview");
}

fn rust_package(&mut self, manifest: &Manifest) -> Package {
Expand Down