-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New files in tests/
give "This file is not included in any crates"
#18279
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
I'd love to help with this, but I'm not sure where to look -- grepping around for the diagnostics and the reload behavior gives me a lot to dig into, but I'm not sure of the semantics. Here, when a
|
Is |
I don't think so -- |
As each file in the |
@ShoyuVanilla Thanks! I'm happy to put in some legwork if you can point me to where the files get loaded at startup time and where they should be detected while the langserver is running ( |
I wish it was that simple: when it comes to project loading/discovery, parts of rust-analyzer are lazy; other parts are eager. We should make all of it lazy, I described why in #17537. I started on the laziness in 491f69a; I should probably finish it. |
Oh, that's quite more complecated than I thought and related to more fundamental debt we have. @9999years I think that I should try resolving the underlying issues and revisit this once we have dealt with it. It may take some time. Sorry 😢 |
No worries! It's not a big issue, I can just restart the LSP. Thanks for the help! |
When I open a new file in
tests/
(e.g.tests/my_test.rs
),rust-analyzer
gives an unlinked file diagnostic:Once I restart the
rust-analyzer
process, the file is loaded correctly. This may be related to #9910, but I only have this issue with files under thetests/
directory.rust-analyzer version:
rust-analyzer 2024-09-02
rustc version:
rustc 1.81.0 (eeb90cda1 2024-09-04)
editor or extension: Neovim with native LSP
relevant settings: https://github.com/9999years/dotfiles/blob/205a5d1738c5520759512bf82454d04059b3b1b3/config/nvim/init.lua#L911-L949
The text was updated successfully, but these errors were encountered: