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

fix(resolver): do not panic when sorting empty summaries #13287

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

weihanglo
Copy link
Member

What does this PR try to resolve?

This is very unlikely to misuse… but I encountered that today.
At our best we should prevent this from happening.

(I didn't hit this when we had first_version and version_ordering separately)

How should we test and review this PR?

Commit by commit.

@rustbot
Copy link
Collaborator

rustbot commented Jan 12, 2024

r? @ehuss

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

@rustbot rustbot added A-dependency-resolution Area: dependency resolution and the resolver S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 12, 2024
@Eh2406
Copy link
Contributor

Eh2406 commented Jan 12, 2024

This seemed reasonable. But for some context how did this come up?

@weihanglo
Copy link
Member Author

This seemed reasonable. But for some context how did this come up?

I use cargo as a lib dependency.

  • Create a source manually.
  • Query a non-existing package
  • Sorting with Some(VersionOrdering::MaximumVersionsFirst) <-- It's my fault that didn't check API change carefully.

@Eh2406
Copy link
Contributor

Eh2406 commented Jan 12, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jan 12, 2024

📌 Commit 6cee9bf has been approved by Eh2406

It is now in the queue for this repository.

@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 Jan 12, 2024
@bors
Copy link
Contributor

bors commented Jan 12, 2024

⌛ Testing commit 6cee9bf with merge 84976cd...

@bors
Copy link
Contributor

bors commented Jan 12, 2024

☀️ Test successful - checks-actions
Approved by: Eh2406
Pushing 84976cd to master...

@bors bors merged commit 84976cd into rust-lang:master Jan 12, 2024
20 checks passed
@weihanglo weihanglo deleted the sort-summaries branch January 12, 2024 16:44
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2024
Update cargo

8 commits in 3e428a38a34e820a461d2cc082e726d3bda71bcb..84976cd699f4aea56cb3a90ce3eedeed9e20d5a5
2024-01-09 20:46:36 +0000 to 2024-01-12 15:55:43 +0000
- fix(resolver): do not panic when sorting empty summaries (rust-lang/cargo#13287)
- Implementation of shallow libgit2 fetches behind an unstable flag (rust-lang/cargo#13252)
- Add documentation entry for unstable `--output-format` flag (rust-lang/cargo#13284)
- doc: add `public` info in `cargo-add` man page. (rust-lang/cargo#13272)
- More docs on prerelease compat (rust-lang/cargo#13286)
- Add unstable `--output-format` option to  `cargo rustdoc` (rust-lang/cargo#12252)
- feat: Add `rustc` style errors for manifest parsing (rust-lang/cargo#13172)
- Document why `du` function uses mutex (rust-lang/cargo#13273)

r? ghost
@rustbot rustbot added this to the 1.77.0 milestone Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependency-resolution Area: dependency resolution and the resolver 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.

5 participants