Closed jdferreira closed 7 years ago
Just a quick note to say that the same thing happens with Windows.
Never mind; all I had to do was update rust nightly and install the (new?) rls-preview
component.
I'm closing the issue.
Thanks.
Facing the same issue, cannot install rls-preivew:
error: could not find
rls-preview
in registryhttps://github.com/rust-lang/crates.io-index
What a mess. Why is extension depends on buggy nightly toolchain, what's the problem with using stable by default? I will be okay with using outdated but at least working copy of rls.
Now it prints 'rls is not found'. Total voodoo magic
According to readme we should switch to https://github.com/rust-lang-nursery/rls-vscode which surprise doesn't work too.
PS Nothing personal, I'm just raged with losing 2 hours on toolchain setup.
@Yanpas I feel your pain :smile:. Also currently working on getting the toolchain to work, and I thought I would drop in and guide you to what I've learned so far 😃.
I've ran rustup component add rls-preview --toolchain nightly
and it seems to work
Getting
$ rustup component add rls-preview --toolchain nightly
error: toolchain 'nightly-x86_64-apple-darwin' does not contain component 'rls-preview' for target 'x86_64-apple-darwin'
Also getting
$ rustup component add rls-preview --toolchain nightly error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'rls-preview' for target 'x86_64-unknown-linux-gnu'
Doesnt work on windows either:
$ rustup component add rls-preview --toolchain nightly error: toolchain 'nightly-x86_64-pc-windows-msvc' does not contain component 'rls-preview' for target 'x86_64-pc-windows-msvc'
Why doesnt it use stable?
Same problem here.
Found my way here after uninstalling from brew and reinstalling via rustup to see if I could get this this working. No dice. How do you re-open an issue?
See that https://github.com/editor-rs/vscode-rust/issues/369 and https://github.com/editor-rs/vscode-rust/issues/370 are related to this. Also about three weeks old at this point.
Okay this plug-in is pretty cool about configuration. Add this to your user settings and pull from beta rather than nightly
// Rust channel to install RLS from.
"rust-client.channel": "beta"
so your entire settings might look something like
// Place your settings in this file to overwrite the default settings
{
"workbench.colorTheme": "Visual Studio Dark",
"window.zoomLevel": 1,
// Rust channel to install RLS from.
"rust-client.channel": "beta"
}
... if you've not configured code much yet.
All, as of today (2017.12.27), this is how I resolved the issue:
# Ensure the rustup component for rls-preview is added.
# I also added the `rust-analysis` & `rustfmt-preview` components; it is possible that
# if those are missing, the vscode plugin may still fail, not 100% sure on that.
rustup update
rustup component add rls-preview
Lastly, ensure your Rust channel config points to stable in your vscode user settings.
...
"rust-client.channel": "stable"
Thanks! that worked for me :D
Alright, so beta and stable are working, but rls-preview / rls don't exist as components on nightly anymore and the beta / stable channels of rls immediately error out on code containing #![feature]
gates.
Is there a way to get a working rls component for nightly? Can you build it yourself so the vscode-rust plugin picks it up and uses it? I tried rls-git in the AUR (which is a part of the meta Rust package) but it has issues with the latest glibc.
Update: The 12-30 nightly has rls-preview, so if anyone else runs into the problem of most nightlies not including the rls component anymore you can grab 12-30 for now!
Having this problem - again - since updating to 1.25.0-nightly (last time was about a month ago, as others have experienced).
What is the fundamental reason for RLS being unavailable in time for each release of nightly rustc?
Hi,
Same for me:
fuszenecker@linux:~$ rustup update
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: checking for self-updates
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.25.0-nightly (da569fa9d 2018-01-16)
fuszenecker@linux:~$ rustup component add rls-preview
error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'rls-preview' for target 'x86_64-unknown-linux-gnu'
fuszenecker@linux:~$
I suppose an adjacent question is - it is appropriate to have the rust language service being sourced from nightly by default for your tooling? I'm still pretty new to the Rust community so I don't know how unusual I am to keep in step with the releases rather than nightly. It seems to me that most of the time something more stable than nightly would cover everything you could expect from a Visual Code plugin.
it is appropriate to have the rust language service being sourced from nightly by default for your tooling?
It seems that it's the only way to make it work - does not work otherwise.
This isn't difficult to solve, but is fairly confusing for first timers. It would be better if a link to workaround is included in the error message. Some other extensions do that.
So, the only and simple solution is to use older toolchain builds. No worries, rustup
supports this:
rustup toolchain install nightly-2018-01-13
rustup default nightly-2018-01-13
The build status of rls can be found here. The page currently says the build have failed since 14 Jan, so 2018-01-13 will work.
There also is a script that automatically finds the latest build which includes RLS, and this one can find the exact version with the latest RLS, which currently is 2018-01-14.
... and I almost forgot this. You'll want to include following lines in your VSCode setting:
"rust-client.channel": "nightly-2018-01-13"
This alone will fix the problem, but downloading toolchain takes time, so you'll have to wait indefinitely until the job finishes. (I mean, I have a slow internet.)
I suppose I was suggesting that if an average Rust user downloads stable, has VS Code installed and wants auto-completion - that class of user does not need to have nightly by default.
Those who do want nightly by default would know enough about rust to set that up.
On 19 January 2018 at 04:17, Eon S. Jeon notifications@github.com wrote:
This isn't difficult to solve, but is fairly confusing for first timers. It would be better if a link to workaround is included in the error message. Some other extensions do that.
So, the only and simple solution is to use older toolchain builds. No worries, rustup supports this:
rustup toolchain install nightly-2018-01-13 rustup default nightly-2018-01-13
The build status of rls can be found here https://rust-lang-nursery.github.io/rust-toolstate/. The page currently says the build have failed since 14 Jan, so 2018-01-13 will work.
There also is [a script that automatically finds the latest build which includes RLS], and this one can find the exact version with the latest RLS, which currently is 2018-01-14.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/editor-rs/vscode-rust/issues/363#issuecomment-358924341, or mute the thread https://github.com/notifications/unsubscribe-auth/AAr4yMHGIDygaHs57SjUOsFAROrbo_Mtks5tMGvWgaJpZM4Pwe78 .
I agree with this why RLS 'needs' nightly and just does not work with stable is beyond my comprehension. Very confusing and annoying.
Probably someone wants to file a new issue, as I'm not sure if closed issues get attention. In my mind getting the stable work without workarounds is a worthy cause. Most language plugins manage that, so why not rust?
If I have time Sunday I'll put in a pull request for that. When I was digging through it a few months ago I think I figured out where that setting was (as mentioned above) and set it for myself in the config file. I think changing the default channel is straight forward. If not someone who is more actively using rust could do it. Right now back in C++ and Python land.
On 19 January 2018 at 16:24, Andrew Savinykh notifications@github.com wrote:
Probably someone wants to file a new issue, as I'm not sure if closed issues get attention. In my mind getting the stable work without workarounds is a worthy cause. Most language plugins manage that, so why not rust?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/editor-rs/vscode-rust/issues/363#issuecomment-359106565, or mute the thread https://github.com/notifications/unsubscribe-auth/AAr4yNMGcTe8-9kpnDqezpmOj7h186Yvks5tMRY1gaJpZM4Pwe78 .
Okay I gave it a go, but I could not get it to compile as-is. Not worked on a VS Code extension before and I'm afraid I'm out of time. There were many warnings from the TypeScript that were being treated as errors. Seems like we could just change the default in the package though? It's null currently, which defaults to nightly everything. https://github.com/editor-rs/vscode-rust/pull/373
I just set "rust-client.channel": "stable"
on my vscode config and it's working ok.
So perhaps part of the confusion is around which VSCode Rust plugin to install (or both). I see Rust 0.4.2 and Rust (rls) 0.3.2 available. The comments above talk about "rust-client.channel" setting but that is only available if you install the latter plugin (rls). If you install the first plugin you get the error dialogs in vscode. This git project also seems to be matched against the first plugin. If I only install that I cannot edit this "rust-client.channel" property as it does not exist.
So again I think maybe there is confusion around which plugins are relevant here. Do I need to install both?
@jolisper did you install the first plugin? which ones did you install? See above.
This is what worked for me today: rustup component add rls-preview --toolchain nightly
.
The solution (nightly 2019-01-15 includes RLS):
rustup toolchain install nightly-2019-01-15
rustup default nightly-2019-01-15
rustup component add rls-preview rust-analysis rust-src --toolchain nightly-2019-01-15
(or configure it to use stable instead of nightly)
On Tue, 22 Jan 2019 at 11:47, Alex Siman notifications@github.com wrote:
The solution:
rustup toolchain install nightly-2019-01-15 rustup default nightly-2019-01-15 rustup component add rls-preview rust-analysis rust-src --toolchain nightly-2019-01-15
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/editor-rs/vscode-rust/issues/363#issuecomment-456494531, or mute the thread https://github.com/notifications/unsubscribe-auth/AAr4yJ6eoDeNPmrnkSTvA9XUe_Y787_zks5vF06jgaJpZM4Pwe78 .
Rust newbie here. One of my project dependencies requires nightly. Now I could not manage to use RLS with it. If rls-preview were available in the nightly toolchain, I think it would solve the problem. Can this be solved with some configuration, so that stable rls is used with other nightly components?
Version of VSCode: 1.17.0 Version of the extension: 0.3.1 OS: Ubuntu 16.04
Description: I cannot start the RLS. I get the following error when I start vscode (or when I reload the window):
When I clicked Yes, I got:
I reinstalled the extension, but the problem persists. I see in the Changelog that there was a change on how RLS detection is performed. Could this be related?
Output of the "Rust logging" channel (the selection box shows "Rust Language Server" and not "Rust logging", but I guess that's what you mean?):