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

feat(resolve): Direct people to working around less optimal MSRV-resolver results #14543

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

epage
Copy link
Contributor

@epage epage commented Sep 14, 2024

What does this PR try to resolve?

In discussing #14414, the general problem of the resolver picking a
version older than a package needs for its MSRV (or lack of one) because of the MSRV of
other packages came up.
This tries to patch over that problem by telling users that a dependency
might be able to be newer than the resolver selected.

The message is fairly generic and might be misread to be about any MSRV
update which an MSRV fallback strategy allows, which would make the
count off.
The reason it is so generic is we don't know with precision why it was
held back

  • Direct dependents may have a non-semver upper bound on the version as
    we aren't trying to unify the version requirements across direct
    dependents at this time
  • A dependency could have removed a feature without making a breaking
    change
    • This seems like it should instead be an error but thats a
      conversation for another day
  • The user enabled -Zminimal-versions
    • This is now detected and the message skipped

Note: separate from this, we may also print the status suffix for this
case if the package was not selected for update (e.g. passing
--workspace).

How should we test and review this PR?

Additional information

…lver results

In discussing rust-lang#14414, the general problem of the resolver picking a
version older than a package needs for its MSRV (or lack of one) because of the MSRV of
other packages came up.
This tries to patch over that problem by telling users that a dependency
might be able to be newer than the resolver selected.

The message is fairly generic and might be misread to be about any MSRV
update which an MSRV `fallback` strategy allows, which would make the
count off.
The reason it is so generic is we don't know with precision why it was
held back
- Direct dependents may have a non-semver upper bound on the version as
  we aren't trying to unify the version requirements across direct
  dependents at this time
- A dependency could have removed a feature without making a breaking
  change
  - This seems like it should instead be an error but thats a
    conversation for another day
- ~~The user enabled `-Zminimal-versions`~~
  - This is now detected and the message skipped

Note: separate from this, we may also print the status suffix for this
case if the package was not selected for update (e.g. passing
`--workspace`).
@rustbot
Copy link
Collaborator

rustbot commented Sep 14, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added Command-update S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 14, 2024
@epage epage marked this pull request as draft September 14, 2024 03:43
Comment on lines 700 to +701
[ADDING] dep1 v0.1.3 (available: v0.1.8)
[NOTE] 1 package may have a higher, compatible versions. To update it, run `cargo update <name> --precise <version>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an example of where it might show up for a non-MSRV case (and the suggested action will fail)

@epage
Copy link
Contributor Author

epage commented Sep 14, 2024

@joshtriplett this is a first pass at supporting a summary message and what wording we might use.

@bors
Copy link
Collaborator

bors commented Sep 21, 2024

☔ The latest upstream changes (presumably #14568) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-update S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants