Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Workaround cargo fingerprinting mtime #165

Open
TriplEight opened this issue Jul 21, 2022 · 1 comment
Open

Workaround cargo fingerprinting mtime #165

TriplEight opened this issue Jul 21, 2022 · 1 comment
Labels

Comments

@TriplEight
Copy link
Contributor

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
  2. find out the git diff
  3. touch the files were changed

Showcased in comparison with rusty-cachier in use-ink/cargo-contract#635.
cc @gilescope @rcny rust-lang/cargo#8623 smithy-lang/smithy-rs#1422

@gilescope
Copy link

gilescope commented Jul 22, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants