Skip to content

rust-analyzer thinks a file is unlinked when it is not #17386

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
melody-rs opened this issue Jun 11, 2024 · 4 comments
Closed

rust-analyzer thinks a file is unlinked when it is not #17386

melody-rs opened this issue Jun 11, 2024 · 4 comments
Labels
C-bug Category: bug

Comments

@melody-rs
Copy link

melody-rs commented Jun 11, 2024

rust-analyzer version: rust-analyzer version: 0.3.1992-standalone [/home/lily/.vscode/extensions/rust-lang.rust-analyzer-0.3.1992-linux-x64/server/rust-analyzer]

rustc version: rustc 1.77.0-nightly (11f32b73e 2024-01-31)

editor or extension: VSCode, ext version v0.3.1992

relevant settings: n/a

repository link: https://github.com/Speak2Erase/Luminol/tree/tilemap-optimizations

Honestly not sure what causes this, but while working on crates/graphics/src/primitives/mod.rs rust-analyzer would disable intellisense and grey out the entire file, because it is not included in the crate hierarchy. If I downgrade to the version from last week, this doesn't happen anymore
image

If I add some random gibberish to cause an error in the file, running cargo run will error:
image

It also doesn't highlight the mod statements in the containing module:
image

rust-analyzer also refuses to format the file (and because I have format on save enabled) this means I can't save this file.

@melody-rs melody-rs added the C-bug Category: bug label Jun 11, 2024
@Veykril
Copy link
Member

Veykril commented Jun 11, 2024

You are likely running into #17378 which locks up discovery of everything. Can you try the latest nightly release? (switching to pre-release in vscode)

@lnicola
Copy link
Member

lnicola commented Jun 11, 2024

This seems fixed for me, but please double-check. A stable release is also available now, no need to switch to nightly.

@melody-rs
Copy link
Author

This does seem fixed now! Although I did notice RA grey out text while it was restarting

@lnicola
Copy link
Member

lnicola commented Jun 11, 2024

Yup, that's normal. Thanks for testing!

@lnicola lnicola closed this as completed Jun 11, 2024
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