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

RLS fails to start, error running rustup #293

Closed
marmistrz opened this issue Apr 4, 2018 · 8 comments
Closed

RLS fails to start, error running rustup #293

marmistrz opened this issue Apr 4, 2018 · 8 comments

Comments

@marmistrz
Copy link

I'm getting a warning:

RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot.

later on:

Unexpected error initialising RLS - error running rustup

in the Rust Language Server logs:

[Error - 1:38:05 PM] Starting client failed
Error: Error starting up rls.
	at /home/marcin/.vscode/extensions/rust-lang.rust-0.4.1/out/src/extension.js:127:19
	at Generator.throw (<anonymous>)
	at rejected (/home/marcin/.vscode/extensions/rust-lang.rust-0.4.1/out/src/extension.js:14:65)
	at <anonymous>
@marmistrz marmistrz changed the title RLS fails to start RLS fails to start, error running rustup Apr 4, 2018
@marmistrz
Copy link
Author

marmistrz commented Apr 5, 2018

When trying to rustup component add rust-src, as advised by @Xanewok, rustup complained that there is no default toolchain.

After

rustup install nightly
rustup default nightly

and installing rls via rustup components (as described in the rls readme) the problem was gone.

Nevertheless, a more helpful error message would be nice.

@marmistrz
Copy link
Author

marmistrz commented Jun 22, 2018

Unfortunately, I have encountered a very similar error after cleaning ~/.rustup with rm -rf ~/.rustup.

As previously, I tried to install the nightly toolchain. Due to rust-lang/rust#51699 I needed to specify it manually:

rustup install nightly-2018-06-18
rustup default nightly-2018-06-18
rustup component add rls-preview rust-analysis rust-src

The error message is exactly the same.

/edit: after setting "rust-client.channel": "stable" I can install and use RLS, so this may be closely related to rust-lang/rust#51699. Anyway, a more helpful message would be nice.

@nrc
Copy link
Member

nrc commented Jun 24, 2018

@marmistrz could you try again today please? Nightly on rustup has been broken for a few days but should now be fixed.

@robatipoor
Copy link

robatipoor commented Mar 7, 2019

I'm getting same error after update to stable-x86_64-unknown-linux-gnu - rustc 1.33.0 (2aa4c46cf 2019-02-28) and nightly-x86_64-unknown-linux-gnu - rustc 1.35.0-nightly (f22dca0a1 2019-03-05)

@flxo
Copy link

flxo commented Mar 7, 2019

@robatipoor Looks like the #517.

Adding rust-client.channel worked for me as well.

@jgilray
Copy link

jgilray commented Mar 10, 2019

The same thing that happened to @robatipoor also happened to me. Thanks for the guidance on how to fix it.

For those (like me), who need a little more hand-holding on vscode, here is what I did to fix it, step-by-step:

  1. Open vscode,
  2. Menu: File -> Preferences -> Settings
  3. Under "User Settings", click "Extensions", click "Rust configuration"
  4. Near the top, under "Rust client: Channel" click "edit in settings.json"
  5. Add the following line: "rust-client.channel": "stable"

So the file looks something like this:
{
"window.zoomLevel": 0,
"rust-client.channel": "stable"
}

  1. Now save. When you next open a workspace and edit a .rs file, RLS should work as expected. Note that RLS only works in a workspace.

@tigerwill90
Copy link

The same thing that happened to @robatipoor also happened to me. Thanks for the guidance on how to fix it.

For those (like me), who need a little more hand-holding on vscode, here is what I did to fix it, step-by-step:

  1. Open vscode,
  2. Menu: File -> Preferences -> Settings
  3. Under "User Settings", click "Extensions", click "Rust configuration"
  4. Near the top, under "Rust client: Channel" click "edit in settings.json"
  5. Add the following line: "rust-client.channel": "stable"

So the file looks something like this:
{
"window.zoomLevel": 0,
"rust-client.channel": "stable"
}

  1. Now save. When you next open a workspace and edit a .rs file, RLS should work as expected. Note that RLS only works in a workspace.

Thank's, that was the solution for me !

@Xanewok
Copy link
Member

Xanewok commented Apr 7, 2019

We now surface a lot more errors as to why RLS could not be started or installed, so I'll close this issue.

@Xanewok Xanewok closed this as completed Apr 7, 2019
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

7 participants