This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Workaround cargo
fingerprinting mtime
#165
Labels
Comments
To fix things properly on cargo / rustc my PRs would have to be broken down
and landed in a series of bite sized increments. Doing it all as one big
change was just too much. I have to say the build.rs shenanigans is a tad
tricky and I don't think that's quite nailed yet in the cargo PR. The rustc
changes were fine though and they could all be landed independently. The
cool thing with the PR though is that almost all the required hashes are
already available but just not made use of.
…On Thu, 21 Jul 2022 at 17:13, Denis Pisarev ***@***.***> wrote:
Every time cache gets downloaded/copied/unzipped it receives a newer mtime
than your git diff will ever be. It's not the case for the local caching
obviously. This is majorly the case for all the CI use-cases both for
sccache and cachepot, and for a long time. Moreover, both are showing the
cache hits, but afterwards, all the cache is being invalidated.
The workaround we could come up with, would be to update mtime of the
modified files so they are newer than the cache artifacts:
1. git-restore-mtime
<https://github.com/MestreLion/git-tools/blob/main/git-restore-mtime>
2. find out the git diff
3. touch the files were changed
Showcased in comparison with rusty-cachier in
use-ink/cargo-contract#635
<use-ink/cargo-contract#635>.
cc @gilescope <https://github.com/gilescope> @rcny
<https://github.com/rcny> rust-lang/cargo#8623
<rust-lang/cargo#8623> smithy-lang/smithy-rs#1422
<smithy-lang/smithy-rs#1422>
—
Reply to this email directly, view it on GitHub
<#165>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEJCAUP6PFHSIRPCKS3ILVVFZIZANCNFSM54IGYNCQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Every time cache gets downloaded/copied/unzipped it receives a newer
mtime
than yourgit diff
will ever be. It's not the case for the local caching obviously. This is majorly the case for all the CI use-cases both forsccache
andcachepot
, and for a long time. Moreover, both are showing the cache hits, but afterwards, all the cache is being invalidated.The workaround we could come up with, would be to update
mtime
of the modified files so they are newer than the cache artifacts:git-restore-mtime
git diff
touch
the files were changedShowcased in comparison with
rusty-cachier
in use-ink/cargo-contract#635.cc @gilescope @rcny rust-lang/cargo#8623 smithy-lang/smithy-rs#1422
The text was updated successfully, but these errors were encountered: