You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all I work on a few repos with hundreds of external dependencies at the root level. Many of those are specified as git paths. @Swatinem pointed out this issue to me related to mtimes.
TL;DR: The cargo caching of GitHub dependencies has a known issue with being cached by timestamp, and not hash. rust-lang/cargo#6529
It's not as simple as saving ~/.cargo/git/checkouts since the timestamp gets updated. See this message for what seems to be happening: the cargo git dependencies appear to be more recent than the checked out code. rust-lang/cargo#6529 (comment)
Elsewhere people have tried to reset mtime in the working tree (not deps) with this https://github.com/chetan/git-restore-mtime-action. Though this would set the mtime to the commit date, which if my understanding is correct, this could make matters worse. Though it did produce a slightly shorter compile time, shaving one minute off: without vs with. But a properly cached git dependencies should bring compile time to zero. paradigmxyz/reth@a22c274
The text was updated successfully, but these errors were encountered:
Hi all I work on a few repos with hundreds of external dependencies at the root level. Many of those are specified as
git
paths. @Swatinem pointed out this issue to me related tomtimes
.TL;DR: The cargo caching of GitHub dependencies has a known issue with being cached by timestamp, and not hash. rust-lang/cargo#6529
It's not as simple as saving
~/.cargo/git/checkouts
since the timestamp gets updated. See this message for what seems to be happening: the cargo git dependencies appear to be more recent than the checked out code.rust-lang/cargo#6529 (comment)
The solutions are more convoluted. A number of people have workarounds:
rust-lang/cargo#6529 (comment)
Elsewhere people have tried to reset
mtime
in the working tree (not deps) with this https://github.com/chetan/git-restore-mtime-action. Though this would set themtime
to the commit date, which if my understanding is correct, this could make matters worse. Though it did produce a slightly shorter compile time, shaving one minute off: without vs with. But a properly cached git dependencies should bring compile time to zero.paradigmxyz/reth@a22c274
The text was updated successfully, but these errors were encountered: