-
-
Notifications
You must be signed in to change notification settings - Fork 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(derive)!: Rename Clap
to Parser
.
#2814
Conversation
The one failed CI check was a network error |
As I always said, instead of renaming, we should be creating the Parser
trait.
`Clap` is planned to be everything trait.
…On Tue, Oct 5, 2021, 17:08 Ed Page ***@***.***> wrote:
The one failed CI check was a network error
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2814 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABKU33HQUAMATIUOBD3H7LUFMPJLANCNFSM5FL4QUNA>
.
|
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.
Agree with the PR, but need minor changes and rebase. And I think you missed a few instances.
Before clap-rs#2005, `Clap` was a special trait that derived all clap traits it detected were relevant (including an enum getting both `ArgEnum`, `Clap`, and `Subcommand`). Now, we have elevated `Clap`, `Args`, `Subcommand`, and `ArgEnum` to be user facing but the name `Clap` isn't very descriptive. This also helps further clarify the relationships so a crate providing an item to be `#[clap(flatten)]` or `#[clap(subcommand)]` is more likely to choose the needed trait to derive. Also, my proposed fix fo clap-rs#2785 includes making `App` attributes almost exclusively for `Clap`. Clarifying the names/roles will help communicate this. For prior discussion, see clap-rs#2583
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.
bors r+
🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
Build succeeded: |
Before #2005,
Clap
was a special trait that derived all clap traits itdetected were relevant (including an enum getting both
ArgEnum
,Clap
, andSubcommand
). Now, we have elevatedClap
,Args
,Subcommand
, andArgEnum
to be user facing but the nameClap
isn'tvery descriptive. This is also important for explaining to the user why they would derive
Args
for an enum in #2621.This also helps further clarify the relationships so a crate providing
an item to be
#[clap(flatten)]
or#[clap(subcommand)]
is more likelyto choose the needed trait to derive.
Also, my proposed fix fo #2785 includes making
App
attributes almostexclusively for
Clap
. Clarifying the names/roles will helpcommunicate this.
For prior discussion, see #2583