zed icon indicating copy to clipboard operation
zed copied to clipboard

Rust Analyzer will cause the application to recompile all the dependency libs for every Cargo test run

Open crazybits opened this issue 9 months ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

make tiny update on the specified test case and re-run the cargo test will make the application to re-compile all the libs

Environment

OS :Mac OS13.6 rustc: 1.77.2 cargo :1.79.0-nightly

If applicable, add mockups / screenshots to help explain present your vision of the feature

should only re-compile the update files rather than all the code

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

NA

crazybits avatar Apr 29 '24 05:04 crazybits

Does it happen for all Rust projects for you? Or just some specific one? Also re:

should only re-compile the update files rather than all the code

It is not enough to recompile the files that you've updated; RA should recompile all crates that depend on a crate you've changed.

Are you using tasks to run the tests?

osiewicz avatar Apr 29 '24 09:04 osiewicz

not tested on other projects. i run the cargo test test_case manually, looks like the Rust Analyzer will change the cache, stop Rust Analyzer could solve the issue

crazybits avatar Apr 30 '24 06:04 crazybits

I'm not sure if that's caused by Zed; could you post your settings.json? Maybe there's something in there that's causing this (I'm mostly thinking of RA initialization_options).

osiewicz avatar Apr 30 '24 09:04 osiewicz