Add support for arg stability attributes (unstable/deprecated) #3321
Labels
A-builder
Area: Builder API
A-help
Area: documentation, including docs.rs, readme, examples, etc...
C-enhancement
Category: Raise on the bar on expectations
S-experimental
Status: Ongoing experiment that does not require reviewing and won't be merged in its current state.
Please complete the following tasks
Clap Version
3.0.10
Describe your use case
I had this idea while I was reviewing @sunshowers's CLI recommendations on versioning: https://rust-cli-recommendations.sunshowers.io/versioning.html. In their book they recommend having a stability flag or environment variable for gating new experimental features being exposed in your CLI. This made me think it would be nice if clap provided some support out of the box for managing the stability of various subsets of an App's CLI.
Describe the solution you'd like
I'm imagining two new methods being added to
Arg
I'd expect these flags to also affect the generated help text to somehow deprioritize unstable/deprecated arguments in the generated output and to make it clear that they are not intended for general use.
Alternatives, if applicable
@epage and @sunshowers have both also suggested adding general support for custom settings / attributes so that a feature like this could be experimented with out of tree rather than needing to bake it into clap directly.
Additional Context
No response
The text was updated successfully, but these errors were encountered: