-
Notifications
You must be signed in to change notification settings - Fork 13.3k
"cargo clean; cargo build" doesn't save work w/ incremental #35167
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
Comments
I needed a double take when reading the title, so for clarification: You put the incr.comp. directory outside of |
@rkruppe yes, that is correct. |
Hmm, it's not as simple as getting "no re-use". For example, I tried the deque package and got these print outs: incremental: re-using 6 out of 6 modules (libc) that's 50% reuse :) granted, it ought to be 100%, but still -- pretty neat. |
A further note: if I just execute the command to rebuild rand, I get 100% reuse. So it's something to do w/ building libc first. |
Problem is that the metadata hashes are changing (unsurprisingly, but also reassuringly). |
hmm so I realize that we are computing metadata hash by iterating over the dep-nodes, but the ordering of that iteration is almost certainly not stable. |
I just confirmed that this is indeed the problem. Have to think about the best way to sort the nodes. |
In fixing #34991, I tried an experiment of doing
cargo build
thencargo clean
andcargo build
with incremental compilation enabled. I believe that, in principle, this ought to enable full-reuse, since the sources haven't changed. It did not. It's worth making a small cargo package and experimenting with why this might be the case (or maybe even small standalone rustc program, though we do see reuse in specific examples).The text was updated successfully, but these errors were encountered: