-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
VSCode extension fails to include!
.rs
file
#18886
Comments
i'm running into the same issue on Zed, so not specific to VSCode. |
@andrewbanchich Do you maybe have a minimal repro? The other repo seems to be too large and has lots of external dependencies, I couldn't really compile it. |
Nothing I can share, sorry. |
I don't have a minimal repo either but we are using prost_build crate in build.rs and trying to include the generated rust file from OUT_DIR |
Bisecting shows that the responsible commit is 096e3e5 |
Ah you did the bisecting for me thanks :) Was planning on looking into this #18748, and my hunch seems to have been right then for the cause |
I assume our deduplication logic for overlapping source roots is failing and my changes surfaced that, we probably just want to undo the changes from m #18668 for now (except for the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I managed to reproduce the issue in a very small example: not sure if it's going to reproduce on other machines, but it works on mine 👀
|
Experiencing same issue in vs code on mac os. Using tonic/prost. |
Tried reverting the commit locally to unblock development in my local environment but there were some conflicts so I'll leave it to someone who knows the code better to post a PR for this. I built the previous commit locally using the following commands in my local rust-analyzer repo:
|
Downgrading vs code extension fixes the issue |
i experience the same/a familiar issue with protobuf (prost). i find it a little odd though, that sometimes it works fine and on the next restart of vim the issue is back again.. is there fix in sight? |
Ah sorry, I'll haven't gotten to rolling back the aforementioned PR I'll do that later today (in hopes it will fix the issue for most here). |
rust-analyzer version:
rust-analyzer version: 0.3.2257-standalone (238ccb628b 2025-01-08)
rustc version:
rustc 1.83.0 (90b35a623 2024-11-26)
editor or extension: VSCode (version 0.3.2257)
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTC
,RUSTUP_HOME
orCARGO_HOME
).vscode/settings.json
:global vscode settings:
repository link (if public, optional): https://github.com/blockscout/blockscout-rs/tree/main/stats
code snippet to reproduce:
(
./stats-proto/src/lib.rs
)Hi. So I've encountered a strange problem where in vscode I get a
rust-analyzer
erroralso autocomplete, hints, and all that stuff doesn't work on the
include!
ed code.but the file exists:
cargo check/build work flawelessly,
and manual
rust-analyzer
diagnostics seems to work without any issues:command output
note that
/Users/bragov4ik/Documents/rust/blockscout-rs/stats/stats-proto/src/lib.rs
is processedwithout errors
I've followed some troubleshooting steps. Enabled debug log level for the extension (as seen in settings.json) and turned on LSP logs in vscode. I haven't found more details apart from the
failed...
message. Anyway, I commented out the line and brought it back, to get all logs related to this. Here are the logs/traces for this issue.Also the
include!
was parsed perfectly before, providing hints/completions and other stuff. Therefore, I'm not sure how to make a MRE for this. I can provide more debug details if needed, the issue persists for some time in the project for me.I've also tried
cargo clean
, restarting vscode, reloading rust analyzer. It doesn't help.The text was updated successfully, but these errors were encountered: