-
Notifications
You must be signed in to change notification settings - Fork 280
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
Rust analyzer shows errors with loco-rs #490
Comments
Never had that one, I'm using pre-release usually, which only failed me once in 3-4 years. rust-analyzer 0.4.1870-standalone (767d5d3ea 2024-03-05) @kaplanelad are you using pre-release or release? |
I tried to switch to pre-release, still happens:
The errors are shown inside |
yes, now i get it! |
From the attached discussion in the Line 151 in c3597ab
|
Yep I got this as well. |
I am not sure, I thought it didn't work as expected, but it mostly does? 🤷🏻 |
Yea, I didn't notice anything but I can now document this like so:
Rust analyzer has trouble dealing with Loco requiring itself (and maybe rightly so?), because it does not deal with these kind of cycles well. Options to resolve:
I'd look at (3) more deeply now that we're aware of it. If rust-analyzer isn't performing well, I'm leaning towards (1), and then having users build "for production" without testing. The disadvantage here is to force users to explicitly say what their feature flags are for production. @kaplanelad WDYT? |
...One more option is to not add UPDATE: this issue is relevant only for Loco testing Loco. Starters work fine (as intended, requiring the |
I came up with a minimal, golf solution. |
Description
When trying to open the
loco-rs
in VSCode with rust-analyzer extension, this extension fails to do its job, with the following errors:To Reproduce
Open the project in VSCode with rust-analyzer installed on a Linux (x64)
Expected Behavior
rust-analyzer should work and give all it's expected functionality, like "go to definitions", etc.
Environment:
rust-analyzer version details (from it's logs):
Additional Context
Probably related to rust-lang/rust-analyzer#14167
I can help debug on my machine if needed. This doesn't happen if one is only opening an internal crate like the
loco-cli
The text was updated successfully, but these errors were encountered: