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

Workaround cargo fingerprinting mtime #165

Open
@TriplEight

Description

@TriplEight

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions