-
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
Unstable updates #9092
Unstable updates #9092
Conversation
I changed my mind on how these should work. I think it is useful to "advertise" the existence of these options on stable. The error message if you try to use it should help guide on what to do.
This is intended to help if the user puts cargo-features in the wrong place in Cargo.toml.
The feature was stabilized without the key in rust-lang#7026 about 1.5 years ago. (Will follow up with an error message in a subsequent commit.)
Previously, when something was stabilized, Cargo would spit out a very unhelpful error message about an unknown -Z flag. This changes it so that it displays a helpful warning (or error).
* Add `removed` support. * Include the version where it is stabilized. * Include a links to the documentation in the error/warning messages.
Attempts to make it clearer on how the different kinds of unstable support works, and clarify the steps for adding new features and stabilizing.
This attempts to make it clearer on the different ways unstable features can be activated.
This adds some redirects so if there are any links to old documentation, they will get redirect to new documentation.
r? @Eh2406 (rust-highfive has picked a reviewer for you, use r? to override) |
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.
Looks great to me!
"#features": "features.html#feature-resolver-version-2", | ||
"#package-features": "features.html#resolver-version-2-command-line-flags", | ||
"#resolver": "resolver.html#resolver-versions", | ||
}; |
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.
Is this a backwards-compatibility thing? This sems like something that may be hard to keep up-to-date over time perhaps
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.
Yea, for example if someone posts a URL on a forum, this will ensure that link doesn't become confusing after the feature gets stabilized. It might still be confusing, but hopefully people will figure it out. If these break over time, I don't think it's a big deal. I can also probably teach the linkchecker to check these, though that's a bit tricky.
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.
Ok that's what I figured, and that sounds good to me. That means it's not super critical we keep a ton of stuff here.
@bors: r+ |
📌 Commit a58e7ff has been approved by |
☀️ Test successful - checks-actions |
Update cargo 7 commits in 783bc43c660bf39c1e562c8c429b32078ad3099b..c3abcfe8a75901c7c701557a728941e8fb19399e 2021-01-20 19:02:26 +0000 to 2021-01-25 16:16:43 +0000 - Minor update to tracking issue template. (rust-lang/cargo#9097) - Add some extra help to `cargo new` and invalid package names. (rust-lang/cargo#9098) - Fix compilation with serde 1.0.122 (rust-lang/cargo#9102) - Add suggestion for bad package id. (rust-lang/cargo#9095) - Remove Registry::new. (rust-lang/cargo#9093) - Fix: set default git config search path for tests (rust-lang/cargo#9035) - Unstable updates (rust-lang/cargo#9092)
This is a collection of updates for unstable/nightly feature support, intended to provide better messages for users and better internal and external documentation. Separated by commit, in summary:
cargo-features
in the wrong place inCargo.toml
.publish-lockfile
. The feature was stabilized without the key in Stabilize publish-lockfile. #7026 about 1.5 years ago. Also added "removed" support for features, which prints out a more helpful error message.-Z
flags (instead of spitting out an unhelpful error message).cargo-features
features.cargo-features
on stable.Closes #9074.