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

Work with canonical URLs in [patch] #7368

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

alexcrichton
Copy link
Member

This commit addresses an issue with how the resolver processes [patch]
annotations in manifests and lock files. Previously the resolver would
use the raw Url coming out of a manifest, but the rest of resolution,
when comparing SourceId, uses a canonical form of a Url rather than
the actual raw Url. This ended up causing discrepancies like those
found in #7282.

To fix the issue all patch intermediate storage in the resolver uses a
newly-added CanonicalUrl type instead of a Url. This
CanonicalUrl is then also used throughout the codebase, and all
lookups in the resolver as switched to using CanonicalUrl instead of
Url, which...

Closes #7282

@rust-highfive
Copy link

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 16, 2019
@ehuss
Copy link
Contributor

ehuss commented Sep 17, 2019

This looks good to me. There are some compile errors, and rustfmt needs to be run, though.

This commit addresses an issue with how the resolver processes `[patch]`
annotations in manifests and lock files. Previously the resolver would
use the raw `Url` coming out of a manifest, but the rest of resolution,
when comparing `SourceId`, uses a canonical form of a `Url` rather than
the actual raw `Url`. This ended up causing discrepancies like those
found in rust-lang#7282.

To fix the issue all `patch` intermediate storage in the resolver uses a
newly-added `CanonicalUrl` type instead of a `Url`. This
`CanonicalUrl` is then also used throughout the codebase, and all
lookups in the resolver as switched to using `CanonicalUrl` instead of
`Url`, which...

Closes rust-lang#7282
@alexcrichton
Copy link
Member Author

@bors: r=ehuss

oops...

@bors
Copy link
Collaborator

bors commented Sep 17, 2019

📌 Commit e545412 has been approved by ehuss

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2019
@bors
Copy link
Collaborator

bors commented Sep 17, 2019

⌛ Testing commit e545412 with merge 35c55a9...

bors added a commit that referenced this pull request Sep 17, 2019
Work with canonical URLs in `[patch]`

This commit addresses an issue with how the resolver processes `[patch]`
annotations in manifests and lock files. Previously the resolver would
use the raw `Url` coming out of a manifest, but the rest of resolution,
when comparing `SourceId`, uses a canonical form of a `Url` rather than
the actual raw `Url`. This ended up causing discrepancies like those
found in #7282.

To fix the issue all `patch` intermediate storage in the resolver uses a
newly-added `CanonicalUrl` type instead of a `Url`. This
`CanonicalUrl` is then also used throughout the codebase, and all
lookups in the resolver as switched to using `CanonicalUrl` instead of
`Url`, which...

Closes #7282
@bors
Copy link
Collaborator

bors commented Sep 17, 2019

☀️ Test successful - checks-azure
Approved by: ehuss
Pushing 35c55a9 to master...

@bors bors merged commit e545412 into rust-lang:master Sep 17, 2019
@alexcrichton alexcrichton deleted the canonical-urls-omg branch September 17, 2019 19:09
@ehuss ehuss added this to the 1.39.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[patch] causes cargo run to succeed once, then fail, with no intervening changes
5 participants