-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving CARGO_HOME invalidates target caches #10915
Comments
That's because fingerprint take source file paths into account 1. Currently, fingerprint calculation mostly relies on filesystem mtime and paths, not content hashes. Cargo never know the intent of a user changing Out of curious, could you share more about why swapping CARGO_HOME? Which CI does that? Footnotes |
What if we instead hashed relative to CARGO_HOME? So long as everything else has stayed the same, we shouldn't need to worry about whether CARGO_HOME has changed I would think |
Concourse creates a new work directory with a random ID during every build on some setups, e.g. macOS workers. For example, one build may create |
Personally I am happy towards this. My little concern is that someone already relies on switching |
This is definitely a duplicate of #10179. Since that one was closed, I'll keep this open. From #10179 (comment):
#12137
I would tell me in the past that whoever depends on absolute |
In #13171 we have an idea that a new subcommand like |
Problem
When the
CARGO_HOME
folder is moved to a new location, subsequent builds invalidatetarget
folder caches because source file paths were updated. This is relevant in CI, where a cache folder can be placed in a new location for every build. If the path changes, there is no way to cache crates, so they must be rebuilt every time.Steps
Note that
serde
is built twice, after theCARGO_HOME
folder is moved.Possible Solution(s)
Perhaps it is possible to have the
CARGO_HOME
portion of crate build paths replaced with something that does not change?Notes
No response
Version
No response
The text was updated successfully, but these errors were encountered: