-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Bogus linkedProjects paths being created #14480
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
Oh no, seems the yes and no buttons for the message got mixed up 😓 Will fix that in a bit, I think we should do a midweek release here since that's gonna trip up a lot of people |
Happen for me too on linuxIt happens for me as well on Ubuntu. It started recently and while it does seem that the yes and no buttons are likely reversed that is not the real problem that I am having. To clarify when I click "Yes" nothing happens, when I click "No" it adds the following to "rust-analyzer.linkedProjects": [
"/rust/Cargo.toml"
], Description of the problem (and initial ideas of what the problem might be)This happens on my leetcode repo and my suspicion is that the problem is related to the fact that the rust project is in a subfolder not at the root of the vscode project. The problem I am having is that when I click "No" that line gets added and until I remove it rust-analyzer does not work anymore and the icon at the bottom turns red and stays red (See screen shot below). Error logsOpening the logs the message I get is:
I'm not sure if there are confounding factors at play because if you look at my And for clarity before that message started coming up and changing my settings rust analyzer used to work fine. Steps to reproduce the problem
Current suspected cause of the problemAfter having read the logs again and looking at the lines added I think the problem is the leading "/" because it is trying to cd into PS. In PyCharm the rust plugin will actually add the |
This should be fixed on the latest nightly (we also pushed out a new a stable release with the fix, but it seems the fix didn't make it in?) |
Yeah, looks like nothing got in that new stable release. I'm not sure yet what I did wrong. We should probably do these more often :(. |
Uh oh!
There was an error while loading. Please reload this page.
Today (in particular, since #14366 got released) I have seen a couple reports of people getting inappropriate
linkedProject
configurations, e.g. this URLO thread.rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.toml file c:\Cargo.toml, Some(Version { major: 1, minor: 68, patch: 2 }): Failed to run "cargo" "metadata" "--format-version" "1" "--manifest-path" "c:\\Cargo.toml" "--filter-platform" "x86_64-pc-windows-msvc": cargo metadata exited with an error: error: manifest path c:\Cargo.toml does not exist
I don't recall where I saw the other case, but I believe it was also on Windows with a path of
D:\Cargo.toml
.This suggests that there may be a bug which is causing manifest paths that don't actually exist to be added to
settings.json
. Since I don't use Windows myself, I don't have a repro for you (and couldn't easily trigger it on my own macOS); I'm just writing this in the hopes that the observation will be useful and save more beginners from a bad experience.The text was updated successfully, but these errors were encountered: