Skip to content
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

refactor(derive): Always do app_methods last #2819

Merged
merged 2 commits into from
Oct 7, 2021
Merged

Commits on Oct 7, 2021

  1. refactor: Be consistent in adding methods last

    This will unblock us from removing the `version` hack because we'll
    always get the right precedence.
    
    Later we can explore ways of moving the app methods to being done first.
    The big problem is with `#[clap(subcommand)]` because we need to call
    those app methods on the subcommands `App` *and* override them with app
    methods on the variant, requiring the app methods to be last to get
    precedence.
    epage committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    412071a View commit details
    Browse the repository at this point in the history
  2. Revert structopt clap-rs#325

    TeXitoi/structopt#325 special cased `version`
    because a default method would be added if the user did nothing, which
    caused problems when nesting subcommands.  We no longer apply that
    default method and the highest item in the chain always has precedence,
    so this can be simplified / clarified.
    epage committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    74799ea View commit details
    Browse the repository at this point in the history