Repository navigation
Conversation
92836db to
45b355e
Compare
|
@ranger-ross what do you think about this special case? Fingerprint may be obsolete in some of the blob store proposals, but if it is still relevant we might want this. |
|
The changes here seem reasonable to me. I probably need to give more thought how fingerprinting will be handled in the blob storage and cache. I think it would be quite difficult to remove fingerprinting until all build units are fully immutable. Part of my wonders if we should make |
|
r? @epage rustbot has assigned @epage. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| [FRESH] bar v0.0.1 | ||
| [WARNING] unused variable: `unused` | ||
| --> [ROOT]/home/.cargo/registry/src/-[..]/bar-0.0.1/src/lib.rs:1:18 | ||
| ... |
There was a problem hiding this comment.
Raise the awareness of this:
One caveat is that because the "object" scope doesn't remap diagonstics,
if diagnostics were also cached,
a replay may show the "wrong" cached paths.
The "all" scope doesn't have this issue btw.
There was a problem hiding this comment.
Might be worth adding a comment pointing out that .cargo is cached and should actually be .cargo-moved but its a trade off we accepted.
Since its not obvious outside of the context of this PR.
|
r? ranger-ross Do you want to review this? SHould we go with an FCP? We could also start small only doing this when scope is |
There was a problem hiding this comment.
The implementation looks good to me.
Given that fingerprints are meant to be Cargo internal, I am completely fine with changing this. If it wasn't for the stale diagnostics, I'd actual even be in favor of not requiring trim paths for this. (I still might be, I am on the fence)
IMO, trim-paths=object feels like a reasonable starting point and can be later adjusted to all or trim-paths=none based on more feedback.
Happy to wait for feedback from others or start an FCP if you feel it is warranted here.
as a sidenote, the way the caching design appears to be going it seems that fingerprints are likely not going to be stored in the cache, making removing absolute paths from fingerprints non-loadbearing for remote caching.
| [FRESH] bar v0.0.1 | ||
| [WARNING] unused variable: `unused` | ||
| --> [ROOT]/home/.cargo/registry/src/-[..]/bar-0.0.1/src/lib.rs:1:18 | ||
| ... |
There was a problem hiding this comment.
Might be worth adding a comment pointing out that .cargo is cached and should actually be .cargo-moved but its a trade off we accepted.
Since its not obvious outside of the context of this PR.
45b355e to
c54cd1c
Compare
This comment has been minimized.
This comment has been minimized.
|
@rfcbot fcp merge T-cargo See the PR description. The user-facing change is that after moving CARGO_HOME user might get stale diagnostics. |
|
@weihanglo has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
|
Seems fine. Moving |
c54cd1c to
877dd8d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
With `trim-paths`, rustc only sees remapped source paths. There is no reason that fingerprint still tracks original paths. This sanitizes absolute paths in Cargo fingerprint by applying the same remap rules with trim-paths. Without this, moving `CARGO_HOME` would cause rebuilds, even the compiled artifacts are byte-identical. One caveat is that because the "object" scope doesn't remap diagonstics, if diagnostics were also cached, a replay may show the "wrong" cached paths. The "all" scope doesn't have this issue btw.
877dd8d to
527cffa
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
What does this PR try to resolve?
With
trim-paths,rustc only sees remapped source paths.
There is no reason that fingerprint still tracks original paths.
This sanitizes absolute paths in Cargo fingerprint
by applying the same remap rules with trim-paths.
Without this,
moving
CARGO_HOMEwould cause rebuilds,even the compiled artifacts are byte-identical.
Fixes #10915
How to test and review this PR?
One caveat is that because the "object" scope doesn't remap diagonstics,
if diagnostics were also cached,
a replay may show the "wrong" cached paths.
The "all" scope doesn't have this issue btw.
The
cargo_home_moved_trim_paths_object_with_diagnosticstest show the caveat.Also, we might not want this if fingerprint will be obsolete soon in some future blob store design.
🤖 LLM disclosure: I used LLM to update snapshots during the development.