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

fix(derive)!: Rename Clap to Parser. #2814

Merged
merged 1 commit into from Oct 10, 2021
Merged

fix(derive)!: Rename Clap to Parser. #2814

merged 1 commit into from Oct 10, 2021

Conversation

epage
Copy link
Member

@epage epage commented Oct 5, 2021

Before #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 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 likely
to choose the needed trait to derive.

Also, my proposed fix fo #2785 includes making App attributes almost
exclusively for Clap. Clarifying the names/roles will help
communicate this.

For prior discussion, see #2583

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@epage
Copy link
Member Author

epage commented Oct 5, 2021

The one failed CI check was a network error

@pksunkara
Copy link
Member

pksunkara commented Oct 5, 2021 via email

Copy link
Member

@pksunkara pksunkara left a 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.

FAQ.md Show resolved Hide resolved
clap_derive/src/derives/mod.rs Show resolved Hide resolved
clap_up/Cargo.toml Outdated Show resolved Hide resolved
site/content/_index.md Outdated Show resolved Hide resolved
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
Copy link
Member

@pksunkara pksunkara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 10, 2021

🕐 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.

@bors
Copy link
Contributor

bors bot commented Oct 10, 2021

Build succeeded:

@bors bors bot merged commit d97c038 into clap-rs:master Oct 10, 2021
@epage epage deleted the parser branch October 12, 2021 12:54
@epage epage mentioned this pull request Oct 12, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants