Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: Add option not to cache
path =
cargo dependencies
Due to Earthly's layer cache code added with `COPY` (even with `--keep-ts`) can end up with timestamps (`mtime`) corresponding to the point of creation of the cache entry, not the current time. However on a following build the `target` mount cache may contain builds from other branches, with different code for those dependencies, which have a newer `mtime`. In this case `cargo` will think it can use the cached dependency instead of rebuilding (because the code appears older than the cached entry under `target`). This only affects `path` dependencies since other dependencies are versioned (either from crates.io or from git dependencies) so cargo's cache key will differ. This should become unnecessary with rust-lang/cargo#14136
- Loading branch information