-
Notifications
You must be signed in to change notification settings - Fork 1.7k
rust-analyzer failed to load workspace again #6020
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
Comments
What rust-analyzer version are you using? |
I tried the latest release |
What is the output of |
There are many lines with the Here is what I have
|
as you can see, there is |
and using grep
|
It looks like this issue is being caused by the recent reorg of the rust-lang/rust repo. As mentioned in the original issue, the I ran rust-analyzer is trying to find the path:
But the actual path that exists is:
If anyone else is looking to temporarily work around the solution just to get their setup working again, you can use:
Simply renaming the directory to |
I didn't think that aliasing will work as I thought rust-analyzer was looking for Thank you! I hope this will be fixed soon. |
This should have been fixed in #5586. Do you have a |
I have Here is my
|
Try unsetting those. |
It works without those environment variable. Thank you! 👍 |
Ah! Yup. I had that variable too. It used to be mandatory for RLS. Thanks @lnicola! 🎉 |
Same for me! Issue resolved :) Thanks @lnicola |
For me setting the |
That would help, but it'd still be better to unset it completely if you're just using rustup. |
I'm curious what you mean with unsetting it completely. I am not aware that I had it set before. Or am I missing something? |
If |
those variables are not set for me but i'm getting the error! pls help |
ls $(rustc --print sysroot)/lib/rustlib/src/rust/src |
That's the old path, it's not supposed to exist. Please check that you're using the newest rust-analyzer version using the "Show RA version" command, provide the full error message and the rustc version, and check whether |
thanks for your prompt response! i switched to installing the rust-analyser from source and this fixed the problem. i guess the binary download isn't updated yet. thanks again. |
I'm getting that error!! I don't have RUST_SRC_PATH nor RUST_SRC set $ ls /usr/lib/rustlib/
rustc-src x86_64-unknown-linux-gnu |
Sorry to reopen this issue #4172 but the issue is still running and is not due to local toolchain installation.
It is more the difference of folders of
rust-src
between stable and nightly.I have both stable and nightly and both have
rust-src
component installed but the folder inside rust-src is not the same for both toolchains.In stable, rust-src contains an
src
folder and the requestedlibcore
folder inside to load the workspace.In nightly, rust-src contains only
library
and so rust-analyzer still tries to loadsrc/libcore
in nightly active toolchain.And so the following still error occurs:
The text was updated successfully, but these errors were encountered: