google / google/wireit

[request] Restore timestamps when restoring from cache.

Open
#1,316 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.4k
Forks
128
Avg merge
4d 10h
Merged PRs (30d)
4

Description

I have set up wireit in CI (Azure DevOps) to improve build times. When wireit runs it will always restore files from cache since there are no output folders. Suprisingly this leads to the `manifest` files having diffs where I am expecting no changes.

Judging by the code this is intentional as no timestamps are restored. This makes sense from the "local machine" workflow but when the output folders are _always_ restored from cache (i.e. external clean, before build) this seems odd. I half expect cache restoration to preserve timestamps.

I suggest that an additional `timestamp` file is stored in the cache folder of a script and that `fs.utimes` is used to set the modified time when restoring from cache. This will more closely match a "restored" state. It also allows other tools to more accurately gauge if files restored from change or not.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.