Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

RLS could not be started #517

Closed
greg5678 opened this issue Mar 7, 2019 · 15 comments
Closed

RLS could not be started #517

greg5678 opened this issue Mar 7, 2019 · 15 comments

Comments

@greg5678
Copy link

greg5678 commented Mar 7, 2019

I just installed rustup and VSCode on MacOS Sierra today and when I use cargo to compile rust files it works fine but VSCode is giving me issues.

Couldn't start client Rust Language Server
Unexpected error initialising RLS - error running rustup
RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot.

@JMS55
Copy link

JMS55 commented Mar 7, 2019

Same exact issue. Rls was working fine, then I upgraded to 1.33.0 and I get the same error.

Latest stable linux gnu toolchain, vscode 1.31.1, latest extension, components and rustup all updated

@oceanlewis
Copy link

Same issue on macOS Mojave

stable-x86_64-apple-darwin (default)
beta-x86_64-apple-darwin
nightly-x86_64-apple-darwin

rustc --version
rustc 1.33.0 (2aa4c46cf 2019-02-28)

@rbudnar
Copy link

rbudnar commented Mar 7, 2019

I also just encountered this on Windows 10 (I'm running on nightly). Here's a snapshot of the errors in the VS code devtools in case it helps:
image

EDIT: Seems that adding this to my settings.json resolved the issue for me:

"rust-client.channel": "nightly-x86_64-pc-windows-msvc"

In VS Code Click File > Preferences > Settings
At the top, search for rust, one of the settings should say "Edit in settings.json". Add the above snippet, using whichever channel is appropriate for you and restart VS code.

@boardwalk
Copy link

Thanks @rbudnar, that worked for me ("nightly-x86_64-apple-darwin" in my case).

@DanielJoyce
Copy link

Pooping the bed for me too on Linux. Will this ever become stable?

I also like when it crashes, but you still have to manually restart. Can't the plugin watch the stdout for error messages and just handle it?

@DanielJoyce
Copy link

DanielJoyce commented Mar 7, 2019

I thought we were done with having to use nightly channels...

This is super frustratig. For the past few weeks I was wondering why code completion was getting worse and worse...

And using the nightly toolchain, now RLS can no longer figure out a project with a library and a bin. SO its useless again. UGH

@rbudnar
Copy link

rbudnar commented Mar 7, 2019

I think you should be able to use stable if you choose. I just so happen to use nightly, so that's what I pasted in there as an example.

@colinwd
Copy link

colinwd commented Mar 7, 2019

Can confirm, stable channel works fine. The issue is that the automatic toolchain name parsing is including (default) in the command to rustup when it shouldn't be.

@mmttim
Copy link

mmttim commented Mar 7, 2019

I have the same issue. Thanks @rbudnar for the solution.

@kinnison
Copy link
Contributor

kinnison commented Mar 7, 2019

This is related to rustup version 1.17.0 changing its UI for improving things for humans.

kinnison added a commit to kinnison/rls-vscode that referenced this issue Mar 7, 2019
Rustup 1.17.0 introduced some extra information in the output of
`rustup show active-toolchain` which was confusing the channel
selector.  This patch deals with that.

Fixed: rust-lang#517

Signed-off-by: Daniel Silverstone <[email protected]>
kinnison added a commit to kinnison/rls-vscode that referenced this issue Mar 7, 2019
Rustup 1.17.0 introduced some extra information in the output of
`rustup show active-toolchain` which was confusing the channel
selector.  This patch deals with that.

Fixed: rust-lang#517

Signed-off-by: Daniel Silverstone <[email protected]>
@bashfulrobot
Copy link

I think you should be able to use stable if you choose. I just so happen to use nightly, so that's what I pasted in there as an example.

Confirmed.

I literally had JUST installed Rust to start out and ran into this.

  • Linux
  • Latest VSCode

Simply putting "rust-client.channel": "stable" solved the issue. No need for nightly.

@Xanewok
Copy link
Member

Xanewok commented Mar 8, 2019

cc #522

@angusgraham
Copy link
Contributor

Fixed in 0.5.4

@astrberg
Copy link

astrberg commented Oct 5, 2019

"rust-client.rustupPath": "~/.cargo/bin/rustup"

did the trick for me 😃

@m3ngyang
Copy link

m3ngyang commented Oct 9, 2019

"rust-client.rustupPath": "~/.cargo/bin/rustup"

did the trick for me 😃

It works for me.

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

No branches or pull requests