-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Tracking Issue for RFC 3085: Edition 2021 #85811
Comments
I want to officially raise my concern about making I believe that making the new feature resolver default via a edition boundary is contrary to RFC-2021. To cite from there what editions are allowed to change:
and
At least in my understanding those points are not true for the resolver change, as this not only affects a single (leaf) crate of the compilation, but the whole dependency tree. This makes setting
as it may force the users providing said dependencies to update their edition as well. This may especially be true for popular crates that are widely used as dependency. Depending on there usage of proc macros, custom derives or their definition of minimal supported rust version + semver this may require major version bump and can result in degraded usability (as the user needs to pass additional matching feature flag to dependencies). See related discussions in rust-lang/cargo#9450 and internals.rust-lang.org for real world examples and potential solutions. In both places it was promised that these concerns would be considered but at the same time neither the post at rust-lang.or nor this tracking issue indicates anything like that. |
@weiznich Yeah, the default resolver change is quite a different beast than the other edition changes, as it is outside the language. I don't think the problem you describe is a big one though, because having both Do we have any data or guesses on how many crates would not compile with |
First of all rust-lang/cargo#9450 (comment) clearly states that cargo is covered by rusts stability guarantee. At least for me this implies that we cannot just say: "both the Rust language and the cargo tool have different 'editions' now" and hide that behind the a unified edition tag. That written: Yes, technically it's possible to "just revert" to the old resolver behaviour, but that misses my point. My main argument remains that this is a breaking change, not only for the current crate opting in the new edition (which would likely be fine), but for the whole dependency tree. There is no way for me as author of some crate in that dependency tree to have a choice about what some down stream user is specifying. Now I totally understand that this is a wanted change and so on, but technically that's not covered by the edition RFC. If you believe that's not the case I would like to know on which part of the RFC you base your argumentation on. I as author of a dependency crate do not have any free choice of the edition anymore, I need to make changes to keep my code compatible with both editions only to make it work for "downstream" users. Let's use that example I personally care of: I'm one of diesels maintainers, which is considered as quite popular database interaction crate. As consequence it is used quite often. Diesel itself now does some things that are not quite compatible with That all written: I can clearly see why it would be desirable to change the default to the now resolver, but I would be happy if there was some more indication for potential users how to resolve issues coming from
Additionally all documentation and messaging around this feature should make it more than clear that any compilation error caused by this feature is not an issue in the crate cargo fails to compile, but an issue with the users configuration. |
Closing as this has stabilized and shipped. |
This is a tracking issue for the RFC "3085" (rust-lang/rfcs#3085).
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
This is really a meta-tracker, since each individual edition feature tracked separately
The 2021 edition is tracked in https://github.com/orgs/rust-lang/projects/7
The edition change are:
resolver = "2"
default: Prepare Cargo forresolver = "2"
as the default in the 2021 edition cargo#9048Foo(Bar(x) | Baz(x))
" #54883Unresolved Questions
The text was updated successfully, but these errors were encountered: