-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
cargo recompiles many of my crate's deps when I switch between cargo check
in sublime and cargo build
in cmd.exe, why?
Usually I have cargo watch -x run
running in Cmder
while coding in sublime and doing cargo check
there. Until today, it was working fine, but now it always recompiles many of my crate's dependencies whenever I do cargo check
in the editor, because cargo watch -x run
has built it in the meantime, also with the deps which don't need to be built: it always recompiles them for both (from the shell and from the editor).
This is very frustrating because it's a huge project which takes a long time to compile, even with incremental compilation.
Btw, I tested it also with a cmd.exe spawned from sublime, and switching between that and the cmd.exe in Cmder. Same behavior. It always rebuilds when I switch shell and cargo build
.
Btw, it only rebuilds direct deps that are in the combined Cargo.toml's of this workspace, not indirect deps, those are always still Fresh
. Why would it rebuild all direct deps though?
This is with nightly 01-16 btw. It didn't happen before.
In the env I don't see any env vars that could cause cargo to recompile..
Why doesn't cargo build -vvvv
print out more info about why it decides to rebuild those crates? (just "Compiling <crate>.."
)