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

Derive API tutorial refers to Builder API concepts rather than the derive API attributes #3489

Closed
2 tasks done
edmorley opened this issue Feb 18, 2022 · 2 comments
Closed
2 tasks done
Labels
C-bug Category: bug

Comments

@edmorley
Copy link

edmorley commented Feb 18, 2022

Please complete the following tasks

Rust Version

N/A

Clap Version

3.1.0

Minimal reproducible code

N/A

Steps to reproduce the bug with the above code

  1. Visit https://github.com/clap-rs/clap/blob/v3.1.0/examples/tutorial_derive/README.md#configuring-the-parser
  2. Read the first few sections and compare the readme explanations to the linked code

Actual Behaviour

The tutorial text says:

You use the Command the start building a parser.

...and later:

You can use command!() to fill these fields in from your Cargo.toml file.

(and so on, there are several more similar usages)

These are the builder API, not the derive API.

Expected Behaviour

I would instead expect the derive tutorial to mention the actual derive attributes seen in the example:
https://github.com/clap-rs/clap/blob/v3.1.0/examples/tutorial_derive/02_apps.rs

...such as #[derive(Parser)], #[clap(name = "MyApp")] etc.

Additional Context

No response

Debug Output

No response

@edmorley edmorley added the C-bug Category: bug label Feb 18, 2022
@epage
Copy link
Member

epage commented Feb 18, 2022

Thanks for letting us know of spots we missed!

@epage epage closed this as completed in bc2be89 Feb 18, 2022
@edmorley
Copy link
Author

Thank you for the fast fix! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants