-
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
-Zmtime-on-use causes spurious rebuilds in workspace #6972
Comments
Sorry I have not had a chance to look into this. Conceptually
Then when we know the offending file, the solution is ether to stop reading it or to stop writing it. That depends on where and why it is read. |
I am experiencing something like this with Rebuilds even without changing any file results in:
|
Hey, thanks for the detailed description, jumping in to participate since I've seen the Another example,
both packages will keep stepping on each other and both will need to be rebuilt. More explicitly,
(Not saying there's no problem here, just trying to better understand the issue to try to participate. Any clarifications would be very helpful, thanks.) |
Grate! Thanks for jumping in!
So let me dig up some history. The Turns out that most better strategies want to know when Cargo last used an artifact. CI often needs record a timestamp, build all the things, GC artifacts older than the timestamp. Crater needs, when the drive fills up GC the oldest things until we have enough room to continue. On the 99% of systems where accessed time is not available from the file system, Cargo needs to provide that data. This was added in #6477, with lots of good discussion. Unfortunately this did not work well on some systems, specifically it made the playground time out, and was put behind the
The intent of
To start investigating I would start by comparing the set of files:
The first two sets can be found by adding some Everything else is unknown unknowns. |
Thanks for this excellent write-up. I'll make a more thorough investigation but my impression (from some logs I set up when first looking at this) is that we're closer to number 3 (without necessarily being the last nail).
I didn't see anything in the code that reflects this intent. It seems to me that Anyway, that is just my first impression and I'm probably missing parts of the puzzle, I'll try to dig deeper systematically scraping the log output as you suggest. |
No need for a deeper dig, you are completely correct. The touching of intermediate artifacts does not preserve the @alexcrichton that was your suggestion and your PRs. How do you think we should fix this? |
Sorry I'm not really up to speed on the issues here and what broke and what it's all used for. That being said experimental features are experimental for a reason which is that we're not willing to commit to keeping them working over time, so I'm sorry if those PRs broke the feature but we can't also just freeze Cargo as-is, tack on experimental features, and then never break anything. |
@Eh2406 With some guidance I could probably start some work towards your proposed solution (if you think that may be a way forward in the GC effort). |
@alexcrichton I am sorry I came across as blaming you. You are absolutely correct, unstable features can and will break. I do not have a problem with your PRs braking the unstable @schomatis Help with a PR would be appreciated! The steps involved making a new test, like the ones added here that using If we agree that remove the cargo/src/cargo/core/compiler/fingerprint.rs Lines 784 to 787 in 65e3885
and the mtime_on_use argument to that function. (and any other code that makes dead.) This should make your new test pass. It should also make the simple_deps_cleaner_dose_not_rebuild test fail, so you'll need to remove it.
|
Oh I'm fine architecting this however works best, so removing something I thought was a good idea because it's no longer a good idea seems fine by me. |
…ate-artifacts-mtime, r=Eh2406 fix(fingerpring): do not touch intermediate artifacts Fixes #6972. The newly introduced [test](9aa7a4d) is [failing](https://travis-ci.com/rust-lang/cargo/jobs/209849725#L2569-L2580) as discussed in #6972 (comment) (replicating the issue). Removing the `touching of intermediate artifacts` as suggested fixes the issue, but makes the old test `simple_deps_cleaner_does_not_rebuild` fail. The `simple_deps_cleaner_does_not_rebuild` test is not needed anymore so it's removed. r? @Eh2406
Thank you @schomatis for the rustflags = ["--remap-path-prefix", "/home/user/.cargo=/"]
|
Problem
Running a build using
-p
or--manifest-path
to build individual crates from a workspace and-Zmtime-on-use
to allow usingcargo-sweep
causes some of the dependencies to get rebuilt when they shouldn't.I have tried to reproduce this in one other workspace I have and it didn't happen, it appears to be somehow specific to the workspace setup in Tide.
Steps
Notes
Output of
cargo version
:cargo 1.36.0-nightly (759b6161a 2019-05-06)
cc @Eh2406
The text was updated successfully, but these errors were encountered: