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

Use locked_version more #10449

Merged
merged 2 commits into from Mar 3, 2022
Merged

Use locked_version more #10449

merged 2 commits into from Mar 3, 2022

Conversation

Eh2406
Copy link
Contributor

@Eh2406 Eh2406 commented Mar 2, 2022

In #9847 we added better tracking for when a requirement came from a lockfile. This uses that tracking in a few more error messages.

Closes #10391

@rust-highfive
Copy link

r? @ehuss

(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 Mar 2, 2022
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Nice! Could you gist a snippet of what the new error messages look like and/or update or add a test to show off the new messages?

tests/testsuite/directory.rs Outdated Show resolved Hide resolved
@Eh2406
Copy link
Contributor Author

Eh2406 commented Mar 2, 2022

I fixed the white space. Our existing error message testing is pretty slim. I will work on adding the test tomorrow.

@Eh2406
Copy link
Contributor Author

Eh2406 commented Mar 3, 2022

I have not yet turned this into a test, but as an anecdote following the steps in #10391
master gives:

error: failed to select a version for the requirement `autocfg = "^1"`
candidate versions found which didn't match: 1.0.1
location searched: directory source `/local/home/jfinkelm/Cargo/issue/vendor` (which is replacing registry `crates-io`)
required by package `issue v0.1.0 (/local/home/jfinkelm/Cargo/issue)`
perhaps a crate was updated and forgotten to be re-vendored?

Pr gives:

error: failed to select a version for the requirement `autocfg = "^1"` (locked to 1.1.0)
candidate versions found which didn't match: 1.0.1
location searched: directory source `/local/home/jfinkelm/Cargo/issue/vendor` (which is replacing registry `crates-io`)
required by package `issue v0.1.0 (/local/home/jfinkelm/Cargo/issue)`
perhaps a crate was updated and forgotten to be re-vendored?

@alexcrichton
Copy link
Member

@bors: r+

👍

@bors
Copy link
Collaborator

bors commented Mar 3, 2022

📌 Commit 4164c46 has been approved by alexcrichton

@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 Mar 3, 2022
@bors
Copy link
Collaborator

bors commented Mar 3, 2022

⌛ Testing commit 4164c46 with merge 72873d8...

@bors
Copy link
Collaborator

bors commented Mar 3, 2022

☀️ Test successful - checks-actions
Approved by: alexcrichton
Pushing 72873d8 to master...

@bors bors merged commit 72873d8 into rust-lang:master Mar 3, 2022
@Eh2406 Eh2406 deleted the locked_version branch March 4, 2022 20:56
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 9, 2022
Update cargo

11 commits in 3d6970d50e30e797b8e26b2b9b1bdf92dc381f34..65c82664263feddc5fe2d424be0993c28d46377a
2022-02-28 19:29:07 +0000 to 2022-03-09 02:32:56 +0000
- Remove remaining 2 warn(clippy::*) instances (rust-lang/cargo#10438)
- Use `available_parallelism` instead of `num_cpus` (rust-lang/cargo#10427)
- Wait up to one second while waiting for curl (rust-lang/cargo#10456)
- Improve code coverage (rust-lang/cargo#10460)
- Don't recommend leaking tokens into the console history (rust-lang/cargo#10458)
- fix some typos (rust-lang/cargo#10454)
- Use `extend` instead of `push`ing in a loop (rust-lang/cargo#10453)
- Use locked_version more (rust-lang/cargo#10449)
- Disable dependabot (rust-lang/cargo#10443)
- Update git2 dependencies (rust-lang/cargo#10442)
- Stop gating stable features (rust-lang/cargo#10434)
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 9, 2022
Update cargo

11 commits in 3d6970d50e30e797b8e26b2b9b1bdf92dc381f34..65c82664263feddc5fe2d424be0993c28d46377a
2022-02-28 19:29:07 +0000 to 2022-03-09 02:32:56 +0000
- Remove remaining 2 warn(clippy::*) instances (rust-lang/cargo#10438)
- Use `available_parallelism` instead of `num_cpus` (rust-lang/cargo#10427)
- Wait up to one second while waiting for curl (rust-lang/cargo#10456)
- Improve code coverage (rust-lang/cargo#10460)
- Don't recommend leaking tokens into the console history (rust-lang/cargo#10458)
- fix some typos (rust-lang/cargo#10454)
- Use `extend` instead of `push`ing in a loop (rust-lang/cargo#10453)
- Use locked_version more (rust-lang/cargo#10449)
- Disable dependabot (rust-lang/cargo#10443)
- Update git2 dependencies (rust-lang/cargo#10442)
- Stop gating stable features (rust-lang/cargo#10434)
@ehuss ehuss added this to the 1.61.0 milestone Apr 7, 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.

Unhelpful error message when lockfile prevents version matching
5 participants