-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Allow people to opt-in to deprecations #3830
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
This adds a new `Cargo.toml` feature named `deprecated` that opts controls whether deprecation warnings show up. This is starting off as non-default though that may change (see below). Benefits - Allows a staged rollout so a smaller subset of users see new deprecations and can report their experience with them before everyone sees them. For example, this reduces the number of people who have to deal with clap-rs#3822. - This allows people to defer responding to each new batch of deprecations and instead do it at once. This means we should reconsider clap-rs#3616. The one risk is people who don't follow blog posts and guides having a harder time upgrading to the next breaking release without the warnings on by default. For these users, we reserve the right to make the `deprecated` feature `default`. This is most likely to happen in a minor release that is released in conjunction with the next major release (e.g. when releasing 4.0.0, we release a 3.3.0 that enables deprecations by default). By using a feature, users can still disable this if they want. Thanks @joshtriplett for the idea
This was referenced Jun 15, 2022
epage
referenced
this pull request
in ruma/ruma
Jun 15, 2022
epage
referenced
this pull request
in stencila/stencila
Jun 15, 2022
These should be able to be removed when upgrading to `clap` 4.0. This was done rather than adding numerous `#[clap(value_parser)]` attributes. See clap-rs/clap#3822.
epage
referenced
this pull request
in GitoxideLabs/gitoxide
Jun 15, 2022
I'd rather not have to deal with the new API because there is no problem with the old one for me. Once 4.0 becomes the default, the work has to be put in to probably achieve the same, but I hope it's not more wordy than before. I also hope that inconveniences will be figured out by the folks in the mean time. Related to clap-rs/clap#3822
This was referenced Jun 15, 2022
epage
referenced
this pull request
in sebastinas/drt-tools
Jun 15, 2022
clap >= 3.2 adds no value, so let them figure out what they want first. This sounds like change for the sake of change. See also clap-rs/clap#3822
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new
Cargo.toml
feature nameddeprecated
that optscontrols whether deprecation warnings show up. This is starting off as
non-default though that may change (see below).
Benefits
deprecations and can report their experience with them before everyone
sees them. For example, this reduces the number of people who have to
deal with Hard to know how to respond to 3.2.0 deprecation messages in the derive API #3822.
deprecations and instead do it at once. This means we should
reconsider fix(app_settings): recommend new APIs for flags disabled in 3.0.0 #3616.
The one risk is people who don't follow blog posts and guides having a
harder time upgrading to the next breaking release without the warnings
on by default. For these users, we reserve the right to make the
deprecated
featuredefault
. This is most likely to happen in aminor release that is released in conjunction with the next major
release (e.g. when releasing 4.0.0, we release a 3.3.0 that enables
deprecations by default). By using a feature, users can still disable
this if they want.
Thanks @joshtriplett for the idea