I'm generating a fairly large rust file (around 60k lines) in OUT_DIR and then include! it into another rust file that get's compiled. Rust analyzer seems to be consuming this file because I see completions and type information when I use the types from that file.
I see the following lines in the output for rust language server. Are these innocuous? If not, is there a way I can dig deeper to get more information about what might be causing this?
ERROR rust_analyzer::main_loop: flycheck 0: File with cargo diagnostic not found in VFS: file not found: <path to the rust file inside OUT_DIR>
I have confirmed that the file path exists on the filesystem.
There isn't much more output. The following is repeated a bunch of times (I guess maybe once per diagnostic or something).
ERROR rust_analyzer::main_loop: flycheck 0: File with cargo diagnostic not found in VFS: file not found: /<path to CARGO_TARGET_DIR>/debug/build/<crate>-a7cb347ba1d1a4fc/out/<path to generated.rs>
Hope this helps someone else that's googling. It turned out that I had a very large number of clippy errors. Once I fixed them, the message went away (I guess since the diagnostics no longer existed). When I re-introduced a small number of clippy issues in the generated code, rust-analyzer displayed them like it normally does. So I guess if you get this message, check that you don't have compilation (or clippy) errors.