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: Deprecate Macro API #2848

Merged
merged 1 commit into from Oct 12, 2021
Merged

fix: Deprecate Macro API #2848

merged 1 commit into from Oct 12, 2021

Conversation

epage
Copy link
Member

@epage epage commented Oct 11, 2021

Fixes #2835

@@ -295,6 +295,10 @@ macro_rules! app_from_crate {
/// [`Arg::max_values(max)`]: crate::Arg::max_values()
/// [`Arg::validator`]: crate::Arg::validator()
/// [`Arg::conflicts_with`]: crate::Arg::conflicts_with()
#[deprecated(
since = "3.0.0",
note = "Replaced with `App` builder API (with `From::from` for parsing usage) or `Parser` derive API (Issue #2835)"
Copy link
Member

@pksunkara pksunkara Oct 11, 2021

Choose a reason for hiding this comment

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

Why do we need (with `From::from` for parsing usage)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since the macro is a compile-time version of the usage parser, I figured people would appreciate knowing where to go for the runtime version.

Copy link
Member

Choose a reason for hiding this comment

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

It could be phrased better. It felt confusing at first.

@pksunkara
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 12, 2021

Build succeeded:

@bors bors bot merged commit 6d046c7 into clap-rs:master Oct 12, 2021
@epage epage deleted the deprecate branch October 12, 2021 12:55
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.

Deprecate Macro API
2 participants