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

Less aggressively poison sources on builds #5288

Merged
merged 1 commit into from
Apr 4, 2018

Conversation

alexcrichton
Copy link
Member

Discovered in #5257 the changes in #5215 were slightly too aggressively
poisoning sources to require updates, thinking that a manifest changed when it
actually hadn't.

Non-workspace-member path dependencies with optional/dev-dependencies
don't show up in the lock file, so the previous logic would recognize this and
think that the dependency missing from the lock file was just added and would
require a registry update.

The fix in this commit effectively just skips all of these dependencies in
non-workspace members. This means that this will be slightly buggy if an
optional dependency that's activated is added, but that's hopefully something we
can tackle later.

Closes #5257

@alexcrichton
Copy link
Member Author

I think we'll want to backport this to beta as well

authors = []

#[dependencies]
#registry2 = { version = "*", optional = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I left that in by accident, either version of this triggers a bug and I was confirming that they both do

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me when tests exercise both non-transitive and optional conditions

[dev-dependencies]
registry2 = "*"
"#,
)
Copy link
Member

@matklad matklad Apr 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for raw literal at the next line

@alexcrichton
Copy link
Member Author

Updated!

authors = []

[dev-dependencies]
registry2 = "*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this checks only non-transitive case? Let’s add a separate test for optional dep as well?

Discovered in rust-lang#5257 the changes in rust-lang#5215 were slightly too aggressively
poisoning sources to require updates, thinking that a manifest changed when it
actually hadn't.

Non-workspace-member path dependencies with optional/dev-dependencies
don't show up in the lock file, so the previous logic would recognize this and
think that the dependency missing from the lock file was just added and would
require a registry update.

The fix in this commit effectively just skips all of these dependencies in
non-workspace members. This means that this will be slightly buggy if an
optional dependency that's activated is added, but that's hopefully something we
can tackle later.

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

@bors: r=matklad

@bors
Copy link
Collaborator

bors commented Apr 3, 2018

📌 Commit 0790db9 has been approved by matklad

@bors
Copy link
Collaborator

bors commented Apr 3, 2018

⌛ Testing commit 0790db9 with merge 428b4a56a896ee3d57584e1b5fbb37821d59f2f4...

@bors
Copy link
Collaborator

bors commented Apr 3, 2018

💔 Test failed - status-travis

@alexcrichton
Copy link
Member Author

alexcrichton commented Apr 3, 2018 via email

@bors
Copy link
Collaborator

bors commented Apr 3, 2018

⌛ Testing commit 0790db9 with merge 6727709d01ebef705d3ef97bbaf587d9aa65d0e9...

@bors
Copy link
Collaborator

bors commented Apr 3, 2018

💔 Test failed - status-travis

@alexcrichton
Copy link
Member Author

alexcrichton commented Apr 3, 2018 via email

@bors
Copy link
Collaborator

bors commented Apr 3, 2018

⌛ Testing commit 0790db9 with merge 4e392fc60a50e733c3ca4d4b0533829c12290731...

@bors
Copy link
Collaborator

bors commented Apr 3, 2018

💔 Test failed - status-travis

@alexcrichton
Copy link
Member Author

alexcrichton commented Apr 3, 2018 via email

@bors
Copy link
Collaborator

bors commented Apr 3, 2018

⌛ Testing commit 0790db9 with merge 1d7a0bb...

bors added a commit that referenced this pull request Apr 3, 2018
Less aggressively poison sources on builds

Discovered in #5257 the changes in #5215 were slightly too aggressively
poisoning sources to require updates, thinking that a manifest changed when it
actually hadn't.

Non-workspace-member path dependencies with optional/dev-dependencies
don't show up in the lock file, so the previous logic would recognize this and
think that the dependency missing from the lock file was just added and would
require a registry update.

The fix in this commit effectively just skips all of these dependencies in
non-workspace members. This means that this will be slightly buggy if an
optional dependency that's activated is added, but that's hopefully something we
can tackle later.

Closes #5257
@bors
Copy link
Collaborator

bors commented Apr 4, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: matklad
Pushing 1d7a0bb to master...

@bors bors merged commit 0790db9 into rust-lang:master Apr 4, 2018
matklad added a commit to matklad/rust that referenced this pull request Apr 4, 2018
This includes at least two notable changes:

  * a regression is fixed where Cargo would update index on every
    operation rust-lang/cargo#5288
  * a new unstable `--out-dir` option is implemented
    rust-lang/cargo#5203
@matklad
Copy link
Member

matklad commented Apr 4, 2018

Will do the backports!

bors added a commit that referenced this pull request Apr 4, 2018
matklad added a commit to matklad/rust that referenced this pull request Apr 4, 2018
rust-lang/cargo#5288 fixes a regression
where cargo would update registry on every operation.
@matklad
Copy link
Member

matklad commented Apr 4, 2018

rustc backport PR: rust-lang/rust#49640

kennytm added a commit to kennytm/rust that referenced this pull request Apr 4, 2018
Update Cargo

This includes at least two notable changes:

  * a regression is fixed where Cargo would update index on every
    operation rust-lang/cargo#5288
  * a new unstable `--out-dir` option is implemented
    rust-lang/cargo#5203
bors added a commit to rust-lang/rust that referenced this pull request Apr 5, 2018
[beta] Update cargo and backport #49612

rust-lang/cargo#5288 fixes a regression
where cargo would update registry on every operation.
alexcrichton added a commit to alexcrichton/cargo that referenced this pull request Apr 6, 2018
This commit extends the fix in rust-lang#5288 by moving the logic added farther up in the
loop over package dependencies. This means that we won't recursively look at
optional/dev path dependencies which aren't members of the workspace. This
should fix the new issue that came up in rust-lang#5257

Closes rust-lang#5257
bors added a commit that referenced this pull request Apr 6, 2018
Fix another issue of poisoning too eagerly

This commit extends the fix in #5288 by moving the logic added farther up in the
loop over package dependencies. This means that we won't recursively look at
optional/dev path dependencies which aren't members of the workspace. This
should fix the new issue that came up in #5257

Closes #5257
alexcrichton added a commit to alexcrichton/cargo that referenced this pull request Apr 6, 2018
This commit extends the fix in rust-lang#5288 by moving the logic added farther up in the
loop over package dependencies. This means that we won't recursively look at
optional/dev path dependencies which aren't members of the workspace. This
should fix the new issue that came up in rust-lang#5257

Closes rust-lang#5257
@ehuss ehuss added this to the 1.27.0 milestone Feb 6, 2022
@ehuss ehuss modified the milestones: 1.27.0, 1.26.0 Feb 14, 2022
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.

Regression: Cargo nightly updates registry on every build with "path" crate
4 participants