-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(resolver): Stabilize resolver v3 #14754
base: master
Are you sure you want to change the base?
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
- `"2"` ([`edition = "2021"`](manifest.md#the-edition-field) default): Introduces changes in [feature | ||
unification](#features). See the [features chapter][features-2] for more | ||
details. | ||
- `"3"` (requires Rust 1.84+): Change the default for [`resolver.incompatible-rust-versions`] from `allow` to `fallback` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side note: When we stabilize 2024 edition, we'll need to update it to say that v3 is the default for it
@rfcbot fcp merge |
Team member @epage has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation wise looks good.
I would like to raise a concern about changing the default resolver at the edition boundary. In my reading of RFC-2052 that's something that is not covered by what editions are allowed to change. Specifically this part of the RFC is relevant:
Source, highlighting of the relevant section by me. In my understanding that forbids any changes on how cargo resolves features, as by definition they affect the whole dependency tree, not only the crate that opt's into this changes. This suddenly turns supporting the new edition into something that is forced onto the dependency crates by the crate that opt's into the new edition. And yes, I'm aware that the 2021 edition contained a similar change, I argued against that back then already for exactly the same reason. |
@weiznich EDIT: To add, this change will not affect existing lockfiles but only when the lockfile is already being changed (a changed |
Thanks for clarifying this difference. That's helpful. I believe that it is still possible that this might cause broken builds of dependencies, for example for the following cases:
Crate x revers in both cases to an crate deep in the dependency tree of that crate that opts into the new resolver. That's written: I would consider both cases above to be clear bugs in crate x and I cannot come up with other examples, so I suppose this might be fine. Therefore consider my concern here resolved.
That's from my point of view not relevant, as it will nevertheless opt in dependencies into the new resolver behaviour by using any of these commands, which might be seen as direct violation of the cited part of the edition RFC. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
What does this PR try to resolve?
This is a follow up to #14639 in prep for Edition 2024
How should we test and review this PR?
This is stacked on #14753
Additional information