Open grovesNL opened 1 month ago
Try setting rust-analyzer.cargo.buildScripts.useRustcWrapper
to false and see if that fixes it. I imagine the crate's build scripts might be trying to do probing that the wrapper interferes with
"rust-analyzer.cargo.buildScripts.useRustcWrapper": false
does seem to work, thanks! Is there anything we could do to handle this better? e.g., fixing the probing upstream if there's a recommended approach
rust-analyzer version: rust-analyzer version: 0.3.2104-standalone (08c7bbc2d 2024-09-06)
rustc version: (eg. output of
rustc -V
): rustc 1.81.0 (eeb90cda1 2024-09-04editor or extension: (eg. VSCode, Vim, Emacs, etc. For VSCode users, specify your extension version; for users of other editors, provide the distribution if applicable): VSCode, rust-analyzer extension v0.3.2104
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTC
,RUSTUP_HOME
orCARGO_HOME
): doesn't seem to be relevant as far as I can tellrepository link (if public, optional): (eg. rust-analyzer): private
code snippet to reproduce: follow the steps below
Open VSCode to that new crate and rust-analyzer might fail with something like this:
If you then try to run
cargo build
manually and restart rust-analyzer's server then it seems to start working again. That workaround isn't too bad for regular use because a lot of people will build often anyway.In a larger project though, I like to use
"rust-analyzer.cargo.targetDir": true
to run rust-analyzer and tests with different configurations without blocking each other. However because ofcargo build
needing to run for rust-analyzer to work, thetargetDir
option can't work anymore, because rust-analyzer reports errors like:(I can't easily get to the start of this log, but I assume this is caused by the same failure as the case above)