-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cargo recompiles hyper and its dependencies every time even if nothing changed #3236
Comments
This definitely seems like a bug! Could you run with |
@alexcrichton Thanks. So for this test I first ran cargo run on the client, then on the server, which both use hyper and are part of the same workspace. Also both depend on yakshaver/core which is also part of the workspace. Also, I can't run client and server at the same time; when I try, I get |
It looks like the reason for recompiling is "profile configuration has changed", do the two projects have different |
Ah yes! One had And it's kinda weird that this leads to a recompile of everything. Btw, in a third crate that belongs to the workspace I have EDIT: The message |
Ah so this is actually a bug in Cargo that will be fixed by #3213
Unfortunately Cargo treats the entire |
So all sub crates will share / inherit the same profile from the workspace Cargo.toml? |
Sure yeah, that's #3206 I think I'm actually going to close this in favor of that as I think it's sorted out, but thanks for the report! |
I have multiple crates that belong to the same workspace. Two of them depend on hyper.
Whenever I run 'cargo build' on one of these two, after I ran it on the other, it recompiles hyper and all its dependencies, even if NOTHING changed. Even if something had changed in my source, it wouldn't have to recompile hyper.
This is very frustrating because I often have to switch between the crates and it always takes multiple minutes to compile.
I use 'hyper = "*"' in both Cargo.toml files, and my Cargo.lock file only contains one version of hyper: 0.9.10. I'm also using Iron in one of them, which also uses this version of hyper.
What's worse is that I can't even run both crates at the same time sometimes, because it says "Blocking waiting for file lock on the git checkouts" even though the other crate is not compiling anymore but running already. But I need to run them at the same time because they are server and client and have to communicate.
I would really appreciate any help on this!
I already tried 'cargo clean', it didn't help..
The text was updated successfully, but these errors were encountered: