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

v3 fix(derive): Add "id" attribute #4068

Merged
merged 1 commit into from Aug 12, 2022
Merged

v3 fix(derive): Add "id" attribute #4068

merged 1 commit into from Aug 12, 2022

Conversation

danielparks
Copy link
Contributor

Backported from future version 4 (original commit 1a2ae76)

Previously the Arg id was set with the "name" attribute. This allows use of an "id" attribute to match the underlying struct.

A side effect of this is that the "id" attribute may also be used on Commands. This isn't desired, but given the current architecture of the attribute parser, it's hard to avoid.

Fixes: #3785


Almost forgot to submit this. The original PR was #4049. Let me know if you’d like me to make any changes.

Backported from future version 4 (original commit
1a2ae76)

> Previously the Arg id was set with the "name" attribute. This allows use
> of an "id" attribute to match the underlying struct.
>
> A side effect of this is that the "id" attribute may also be used on
> Commands. This isn't desired, but given the current architecture of the
> attribute parser, it's hard to avoid.
>
> Fixes: #3785
@danielparks danielparks changed the title fix(derive): Add "id" attribute v3 fix(derive): Add "id" attribute Aug 12, 2022
@epage epage merged commit e29f014 into clap-rs:v3-master Aug 12, 2022
@epage
Copy link
Member

epage commented Aug 12, 2022

3.2.17 is now released with this

@danielparks danielparks deleted the issue-3785-derive-id-attr-v3 branch August 12, 2022 17:42
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

2 participants