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

Avoid updating registry when adding existing deps #3144

Merged
merged 1 commit into from
Oct 6, 2016

Conversation

alexcrichton
Copy link
Member

Cargo previously erroneously updated the registry whenever a new dependency was
added on a crate which already exists in the DAG. This commit fixes this
behavior by ensuring that if the new dependency matches a previously locked
version it uses that instead.

This commit involved a bit of refactoring around this logic to be a bit more
clear how the locking and "falling back to the registry" is happening.

Closes #2895

@rust-highfive
Copy link

@alexcrichton: no appropriate reviewer found, use r? to override

@alexcrichton
Copy link
Member Author

r? @brson

Cargo previously erroneously updated the registry whenever a new dependency was
added on a crate which already exists in the DAG. This commit fixes this
behavior by ensuring that if the new dependency matches a previously locked
version it uses that instead.

This commit involved a bit of refactoring around this logic to be a bit more
clear how the locking and "falling back to the registry" is happening.

Closes rust-lang#2895
Closes rust-lang#2931
@sfackler
Copy link
Member

sfackler commented Oct 5, 2016

Woo!

@brson
Copy link
Contributor

brson commented Oct 5, 2016

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 5, 2016

📌 Commit c0306a8 has been approved by brson

@bors
Copy link
Collaborator

bors commented Oct 5, 2016

⌛ Testing commit c0306a8 with merge 80d20e9...

bors added a commit that referenced this pull request Oct 5, 2016
Avoid updating registry when adding existing deps

Cargo previously erroneously updated the registry whenever a new dependency was
added on a crate which already exists in the DAG. This commit fixes this
behavior by ensuring that if the new dependency matches a previously locked
version it uses that instead.

This commit involved a bit of refactoring around this logic to be a bit more
clear how the locking and "falling back to the registry" is happening.

Closes #2895
@bors
Copy link
Collaborator

bors commented Oct 6, 2016

☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64
Approved by: brson
Pushing 80d20e9 to master...

@bors bors merged commit c0306a8 into rust-lang:master Oct 6, 2016
@alexcrichton alexcrichton deleted the less-update-registry branch October 6, 2016 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cargo requires a registry update when adding dep that already exists in dag
5 participants