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

Version output is inconsistent with other tools #12280

Closed
cuviper opened this issue May 16, 2022 · 4 comments · Fixed by #12449
Closed

Version output is inconsistent with other tools #12280

cuviper opened this issue May 16, 2022 · 4 comments · Fixed by #12449
Assignees

Comments

@cuviper
Copy link
Member

cuviper commented May 16, 2022

This is minor, but I noticed the version output in rust-analyzer-preview builds from rustup is inconsistent with other tools:

$ rustc --version
rustc 1.63.0-nightly (42e1761c7 2022-05-15)
$ cargo --version
cargo 1.63.0-nightly (3f052d8ee 2022-05-12)
$ rust-analyzer --version
rust-analyzer 5d5bbec 2022-05-15 dev
  • The overall format / field-order doesn't match.
  • The commit hash is accurate to the submodule under rust, so that's fine.
  • The date is the build date, rather than the commit date. I included cargo above as an example where that's different, as the build is current but the submodule is not updated every day.
  • The "dev" string looks like it comes from lack of RUST_ANALYZER_CHANNEL in the build script. It's not a big deal, except it also triggers poke_rust_analyzer_developer, which we probably don't want in official builds. Maybe rustbuild should set this to "preview" for now, and eventually follow rustc's own channel names.

This may be something to track in #4224.

@Veykril
Copy link
Member

Veykril commented May 20, 2022

So to clarify, ideally for the rust-up component build we should provide the following format rust-analyzer <toolchain-version>-<toolchain-channel> (<commit-hash> <commit-date>)?

@lnicola
Copy link
Member

lnicola commented May 20, 2022

We might as well use that format every time.

@cuviper
Copy link
Member Author

cuviper commented May 20, 2022

Right, I'm suggesting to match the format, but also to make sure the channel is some kind of release, not one that "pokes".

@Veykril
Copy link
Member

Veykril commented May 20, 2022

Yes not poking is definitely somethign we'd want. For our dev builds we don't want to show something like 1.63.0-nightly anyways since these builds aren't really tied to a rust release, so for dev builds we can use some other string here to signal that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants