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

Consider providing a mode to use a preinstalled (system) rust-analyzer #128

Open
intelfx opened this issue May 2, 2024 · 3 comments
Open

Comments

@intelfx
Copy link

intelfx commented May 2, 2024

Currently, LSP-rust-analyzer automatically downloads into $HOME and runs a binary from Internet. This is not necessarily welcome.

Consider implementing a mode similar to LSP-clangd's "binary": "system" where LSP-rust-analyzer would invoke a rust-analyzer that is already installed elsewhere and/or available in $PATH.

intelfx added a commit to intelfx/dotfiles that referenced this issue May 2, 2024
This will still download the blob but at least it won't execute it
(pending sublimelsp/LSP-rust-analyzer#128).
@rchl
Copy link
Member

rchl commented May 3, 2024

The reason it's not recommended is that the functionality and settings that are part of this package might not be fully compatible with your system version of rust-analyzer.

At minimum it can cause warnings about settings being invalid and possibly more serious issues (in theory).

That said, I'm not saying that it definitively shouldn't be supported. On your own risk.

@intelfx
Copy link
Author

intelfx commented May 8, 2024

The reason it's not recommended is that the functionality and settings that are part of this package might not be fully compatible with your system version of rust-analyzer.

At minimum it can cause warnings about settings being invalid and possibly more serious issues (in theory).

Perhaps, but as I said, automatically downloading and running binaries from Internet is not necessarily welcome; and in the environments it is not welcome, this (i.e. security) trumps convenience.

That said, I was not aware it was not recommended. Would you accept a PR adding a "binary": "system" mode like LSP-clangd has?

@rchl
Copy link
Member

rchl commented May 11, 2024

PR is welcome as long as it's documented and makes it clear what the disadvantages are (what I've mentioned more or less).

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