Skip to content

MonoRepo - linkedProjects ERROR FetchWorkspaceError #17752

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

Closed
grahamsmallenroly opened this issue Jul 31, 2024 · 4 comments
Closed

MonoRepo - linkedProjects ERROR FetchWorkspaceError #17752

grahamsmallenroly opened this issue Jul 31, 2024 · 4 comments
Labels
C-bug Category: bug

Comments

@grahamsmallenroly
Copy link

rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
rust-analyzer version: 0.3.2053-standalone (fd74511 2024-07-28)

rustc version: (eg. output of rustc -V)
rustc 1.80.0 (051478957 2024-07-21)

editor or extension: (eg. VSCode, Vim, Emacs, etc. For VSCode users, specify your extension version; for users of other editors, provide the distribution if applicable)
VSCode rust-analyzer v0.3.2053

relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)
"rust-analyzer.linkedProjects": [
"rust/lambdas/[some project name]/Cargo.toml",
...
]
}
repository link (if public, optional): (eg. rust-analyzer)

code snippet to reproduce:

// add your code here

Experiencing the following error
2024-07-31T15:04:55.390885Z ERROR failed to find any projects in [AbsPathBuf("/Users/**/my-dev/")]
2024-07-31T15:04:55.401650Z ERROR FetchWorkspaceError:
rust-analyzer failed to discover workspace
2024-07-31T15:04:55.402082Z ERROR FetchWorkspaceError:
rust-analyzer failed to discover workspace

We are a mono-repo, there is no .toml file in root. We have a .vscode/settings.json file with values for rust-analyzer.linkedProjects being the project roots of rust projects.

This has been working.

I can see the extension has been updated today: Last released 2024-07-31, 01:32:43

@grahamsmallenroly grahamsmallenroly added the C-bug Category: bug label Jul 31, 2024
@davidbarsky
Copy link
Contributor

The workaround, at least until #17750 is in a build, is to use absolute paths. Closing as a duplicate of #17664.

@davidbarsky davidbarsky closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2024
@lnicola
Copy link
Member

lnicola commented Jul 31, 2024

#17750 is now available in a pre-release build.

@grahamsmallenroly
Copy link
Author

Lovely. Thank you.

@grahamsmallenroly
Copy link
Author

I can confirm the pre-release version has fixed thee issue I was experiencing. 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants