Incorrect warnings while RA is still loading
When opening this file, RA briefly shows an incorrect warning:
RA version: rust-analyzer version: 0.3.2121-standalone [/home/r/.vscode-oss/extensions/rust-lang.rust-analyzer-0.3.2121-linux-x64/server/rust-analyzer]
Settings:
"rust-analyzer.lens.enable": false,
"rust-analyzer.cachePriming.enable": false,
"rust-analyzer.cargo.buildScripts.useRustcWrapper": false, // https://github.com/rust-lang/rust-analyzer/issues/14722
"rust-analyzer.diagnostics.disabled": [
"unlinked-file",
"macro-error" // trouble with the xshell `cmd!` macro
],
I believe this is due to us loading the project before loading the standard libraries. We shouldn't compute semantic diagnostics at this loading stage (only parse diagnostics).
I also tend to get the "file not included in module tree" error.
That is related but not quite the same. But you are right in that we should surpress those as well until the project is loaded
I also tend to get the "file not included in module tree" error.
me too...The program can be run normally, but the prompt is a sad state....😶😶 Even if restart the service
@RSS1102 Briefly, or constantly? This issue is about errors/warnings that are shown because the project is not fully loaded and disappear when it finishes loading.
@RSS1102 Briefly, or constantly? This issue is about errors/warnings that are shown because the project is not fully loaded and disappear when it finishes loading.
🥲🥲🥲After many modifications, I think it should be a problem with the file case.
After my investigation:
At first my file was named: window_Menu.rs. I changed the file name to window_menu.rs, and it prompted unlink-file, and asked me to create a pub mod window_Menu. (No matter I restarted the rust-analyzer server, restarted vscode, or even restarted the computer, it didn't work.) When I changed the file name to a different windows_menu.rs (there is an extra s), it worked.
It seems that the file name is not case sensitive.
@RSS1102 On Windows it is case insensitive, on Linux it is case sensitive (not sure about MacOS). I believe there is a way to rename case in Windows, but I think VSCode does not respect that.
@RSS1102 On Windows it is case insensitive, on Linux it is case sensitive (not sure about MacOS). I believe there is a way to rename case in Windows, but I think VSCode does not respect that.
I think so, maybe there are other methods that need to be further explored.🥹🥹
@RSS1102 I think you are having a different issue. Please only post in an existing issue when you are sure it is the same. Otherwise, open a new issue, and reference the potential old issues.