Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Can't find rustup #231

Closed
robinst opened this issue May 10, 2017 · 29 comments
Closed

Can't find rustup #231

robinst opened this issue May 10, 2017 · 29 comments

Comments

@robinst
Copy link

robinst commented May 10, 2017

Version of VSCode: 1.12.1
Version of the extension: 0.3.14
OS: Mac OS

Description: I get the "You do not use Rustup. Rustup is a preffered way to install Rust and its components" message. But I have rustup installed. Not sure where to configure it to fix it. Output:

$ rustc --print=sysroot
/Users/rstocker/.multirust/toolchains/stable-x86_64-apple-darwin
$ where rustup
/Users/rstocker/.cargo/bin/rustup
$ where rustc
/Users/rstocker/.cargo/bin/rustc

Thanks for your help!

Output of the "Rust logging" channel:

DEBUG: handleMissingRls: Rust is either not installed or installed not via Rustup
DEBUG: Configuration: updatePathToRacer: findRacerPathSpecifiedByUser: path=undefined
DEBUG: Configuration: updatePathToRacer: findDefaultRacerPath: foundPath=undefined
DEBUG: Legacy Mode Manager: MissingToolsInstallator: getMissingTools(): pathDirectories=["/usr/local/bin","/usr/local/sbin","/usr/local/share/npm/bin","/usr/bin","/bin","/usr/sbin","/sbin"]
DEBUG: Legacy Mode Manager: MissingToolsInstallator: getMissingTools(): tools={"rustfmt":"rustfmt","rustsym":"rustsym"}
DEBUG: Legacy Mode Manager: MissingToolsInstallator: getMissingTools(): this.missingTools = ["racer","rustfmt","rustsym"]

@KalitaAlexey
Copy link
Member

@robinst,
Rustup stopped using .multirust a long time ago.
I haven't thought someone still uses this.
Currently you can configure it yourself:
Start code with RUSTUP_HOME=/Users/rstocker/.multirust.
It should help.

@robinst
Copy link
Author

robinst commented May 10, 2017

Weird, I have the newest version of rustup. I guess it has some special handling to keep installing into the same directory.

I'll try wiping it and reinstalling rustup and see which directory it ends up in. Thanks!

@kosta
Copy link

kosta commented May 10, 2017

As far as I know, .multirust still exists for legacy reasons and is part of rustup. It should just be a symlink to .rustup, anyway. You can verify with ls -lha ~/.

@jfromell
Copy link

Having the same problem with a freshly installed Rust

rustc --print=sysroot
~/.rustup/toolchains/stable-x86_64-apple-darwin

@KalitaAlexey
Copy link
Member

@JonasFromell,
Now it doesn't work because the stable toolchain is used.

@robinst
Copy link
Author

robinst commented May 11, 2017

Freshly installed rustup now, still doesn't find it:

$ rustc --print=sysroot
~/.rustup/toolchains/stable-x86_64-apple-darwin

@KalitaAlexey
Copy link
Member

@robinst,
You use the stable toolchain.
Make rustup default nightly.

@robinst
Copy link
Author

robinst commented May 11, 2017

Tried switching to nightly, still get "You do not use Rustup. Rustup is a preffered way to install Rust and its components".

@KalitaAlexey
Copy link
Member

Post what the "Rust Logging" output channel says if you start the extension and the nightly is used.

@jfromell
Copy link

Switched to nightly, still got the message. But after a few restarts of VSCode the message disappears. Same thing again when i did an rustup update today. Messaged appeared on first startup of VSCode but disappeared when i restarted it.

@robinst
Copy link
Author

robinst commented May 12, 2017

So I think I know what the problem was for me: ~/.cargo/bin needs to be added to the PATH in ~/.profile. I just had it set in my zsh config files, but that doesn't get picked up by the session.

Maybe vscode-rust could check ~/.cargo/bin directly if it doesn't find rustup in the PATH?

@KalitaAlexey
Copy link
Member

@robinst,
No, it will not.
I am sorry, but this is an specific case which I don't want to handle via the extension.

@wagenet
Copy link

wagenet commented May 15, 2017

@KalitaAlexey It does seem like there should at least be some documentation on how to solve this issue. Telling people they don't have Rustup installed when they know they do is problematic. Maybe a better message would also be to say "can't find rustup".

@KalitaAlexey
Copy link
Member

KalitaAlexey commented May 16, 2017

@wagenet,
I am working on it.
I didn't thought a lot of people would have this problem.
I expected that I would have time to implement installing Rustup and etc.

@varkor
Copy link

varkor commented Jun 12, 2017

Is this issue supposed to be fixed? I still get the banner every time I open Visual Studio Code, despite rustup being installed.
This might be the same issue as #242.

@willmurphyscode
Copy link

I also still get this banner every time. Does this affect everyone running on a Mac?

@jeremiahbiard
Copy link

I'm also getting this error on Fedora 25 so it's not Mac specific

rustc --print=sysroot
~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu

@liamdawson
Copy link

One silly way you can get this, is to reopen VSCode from a terminal that was opened before you installed rustup, because the PATH won't be updated. Just in case you're trying to debug this issue like I just was. 😞

@KalitaAlexey
Copy link
Member

@liamdawson,
It's actually understandable.
It's not an issue because that's how OS works.

@liamdawson
Copy link

liamdawson commented Jun 20, 2017 via email

@KalitaAlexey
Copy link
Member

I've just published the new version (0.4.0).
Check whether your issue happens or not.

@robinst
Copy link
Author

robinst commented Jun 22, 2017

It still doesn't work for me.

DEBUG: RlsMode: start: enter
DEBUG: RlsMode: start: no RLS executable
DEBUG: RlsMode: start: no rustup
DEBUG: RlsMode: handleMissingRlsAndRustup: enter

@KalitaAlexey
Copy link
Member

@robinst,
How to you start VSCode?
I see you had problems with PATH. This problem is not going to be fixed at the moment.

@robinst
Copy link
Author

robinst commented Jun 22, 2017

Via the .app on Mac OS. Ok :/.

@KalitaAlexey
Copy link
Member

@robinst,
The problem appears when you run from ".app"? It's more interesting.
Try https://stackoverflow.com/a/3756674

@KalitaAlexey
Copy link
Member

Those who use Linux, https://help.ubuntu.com/community/EnvironmentVariables

@KalitaAlexey
Copy link
Member

I hope it helps.

@robinst
Copy link
Author

robinst commented Jul 19, 2017

For anyone else having problems, give this extension a go, it worked better at finding rustup for me:

https://marketplace.visualstudio.com/items?itemName=rust-lang.rust

@pronebird
Copy link

pronebird commented Nov 14, 2017

I have the same issue with recent rustup but only when macOS automatically restores windows on OS startup. I think there must be something missing in env at this point. After restarting VSCode everything works as expected.

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

10 participants