Skip to content
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

Hash paths relative to the workspace into metadata. #14953

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Dirbaio
Copy link
Contributor

@Dirbaio Dirbaio commented Dec 18, 2024

Currently Cargo hashes the relative path if it's under the workspace root,
or absolute if it isn't.

This causes non-reproducibility problems when using dependencies like path = "../foo"
that point to crates outside the workspace (or when not using a workspace at all).

This PR fixes the problem by making all paths relative to the workspace root, not
just paths under it.

Fixes #13586

@rustbot
Copy link
Collaborator

rustbot commented Dec 18, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 18, 2024
@Dirbaio
Copy link
Contributor Author

Dirbaio commented Dec 18, 2024

r? @weihanglo

this is related to #14951 , also #13586 (comment)

@rustbot rustbot assigned weihanglo and unassigned ehuss Dec 18, 2024
@ehuss
Copy link
Contributor

ehuss commented Dec 18, 2024

Can we make sure this has a test? I'm not sure if the intent here is to ensure it stays consistent if the tree is moved, perhaps just a freshness test would suffice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not reproducible when a project is copied to another directory
4 participants