Closed frederikhors closed 1 year ago
Not sure if this matters for cg-clif specifically, but when working with VSCode + rust-analyzer, this seems to stop that behaviour:
"rust-analyzer.cargo.extraArgs": ["--target-dir", "target/rls/"],
This puts the RA's artifacts into a separate folder, so that your regular compilation isn't contending with RA.
This works amazingly well!
I'm only afraid that in future the extraArgs
can be a issue, but for now it works good!
Thanks again!
Today I'm getting this error after a rust-analyzer update (I think):
[ERROR rust_analyzer::main_loop] FetchWorkspaceError:
rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.toml file C:\prj\Cargo.toml, Some(Version { major: 1, minor: 69, patch: 0 }): Failed to run `"cargo" "metadata" "--format-version" "1" "--manifest-path" "C:\\prj\\Cargo.toml" "--target-dir" "target/rls/" "--filter-platform" "x86_64-pc-windows-msvc"`: `cargo metadata` exited with an error: error: unexpected argument '--target-dir' found
Usage: cargo.exe metadata --format-version <VERSION> --manifest-path <PATH>
For more information, try '--help'.
Is a RA bug, sorry.
Many times in my console I can see this line:
Blocking waiting for file lock on build directory
I think this is due to VSCode with rust-analyzer that work for the auto
cargo check
.Since I'm using
cargo-clif
on the nightly version and VSCode with rust-analyzer are using cargo at the stable one, is there a way to avoid thatBlocking...
behavior?Some setting to set?
What do you think?
I re-generate or save files and I wait for both cargo-clif and VScode to finish before starting my app again. This is very bad.