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

Rust analyzer version is hardcoded #29

Closed
akhildevelops opened this issue Apr 17, 2023 · 9 comments
Closed

Rust analyzer version is hardcoded #29

akhildevelops opened this issue Apr 17, 2023 · 9 comments

Comments

@akhildevelops
Copy link

Currently the rust analyzer version is hard coded and there's no way to use latest release.

@akhildevelops
Copy link
Author

"https://github.com/rust-lang/rust-analyzer/releases/download/2023-01-02/{}.gz",

@panekj
Copy link
Contributor

panekj commented Apr 17, 2023

There is no latest version, you should use rustup component add rust-analyzer and use absolute path to RA in plugin settings if you want version that is "latest"

@akhildevelops
Copy link
Author

I think that's tedious and boring.

This link https://github.com/rust-lang/rust-analyzer/releases/latest/download/rust-analyzer-aarch64-unknown-linux-gnu.gz everytime points to latest release of rust-analyzer

@panekj
Copy link
Contributor

panekj commented Apr 17, 2023

And I think downloading always newest version is lazy and unstable.

@akhildevelops
Copy link
Author

I agree that latest release can be buggy. But a fixed version wouldn't help either as the analyzer might get outdated, doesn't get fixes for the bugs.

I've a suggestion, let the user decide on the version he wants to install from plugin settings, if not mentioned it will always point to latest (i.,e defaults to latest). What do you think ?

@akhildevelops
Copy link
Author

akhildevelops commented Apr 18, 2023

I understand now what do you meant by no latest. I was thinking that rust-analyzer is independent to rustc and haven't known that rustup can be used to install compatible rust-analyzer depending on the rust toolchain.

Why can't we use rustup to install rust-analyzer and then set the path ? After adding rust-analyzer using rustup component add rust-analyzer we can get the path by rustup which rust-analyzer based on the active toolchain.

❯ rustup which rust-analyzer
/home/akhil/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rust-analyzer

Let me know if you are interested in this idea, I'll try to give a PR

@panekj
Copy link
Contributor

panekj commented Apr 18, 2023

Why can't we use rustup to install rust-analyzer and then set the path ?

It wasn't possible before.

we can get the path by rustup which rust-analyzer

I'm aware of that but we don't have a way yet to get command output in plugins.

@akhildevelops
Copy link
Author

akhildevelops commented Apr 18, 2023

I'm aware of that but we don't have a way yet to get command output in plugins.

I.e, because plugin runs as wasi binary ?

@akhildevelops
Copy link
Author

Closing this as there's no proper way to configure rust analyzer version

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

No branches or pull requests

2 participants