-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Refactor clap_generate #1678
Refactor clap_generate #1678
Conversation
d0b92dd
to
3b8527f
Compare
The tests are failing because something changed in clap v3 since the |
I would rather postpone any work on clap_generate for the time being. let's focus our efforts on clap_derive first, then on the next alpha release, and then we can move to other stuff. |
I thought it would be just moving it to this repo, but then I got bogged down with refactoring. 😞 |
That's what I'm talking about :) If you want to refactor something - refactor stuff in `src/`, we do need it and it will help to get a grasp of the codebase (we're going to need to comprehend the codebase anyway). Generators can wait. I'm working on this "multiple trait" derive of ours and I expect it to be done by the evening (we all know what my deadlines really worth, but I'll try really hard).
|
I haven't pulled this PR because |
72ea56b
to
2720413
Compare
I assume you gave a close look at this PR because there probably will be no changes for 3.0 in this crate. |
Not so close, just reviewed the public API and it looks pretty good. I haven't looked at the impl. |
Just validate the |
There's no |
Looks fine. |
bors r=CreepySkeleton |
1678: Refactor clap_generate r=CreepySkeleton a=pksunkara I have copied the code from [clap_generate]( https://github.com/clap-rs/clap_generate) and refactored the structure a bit. This new structure will allow people to write their own generators using our `Generator` trait which will contain some helpers (Still working on polishing them). Co-authored-by: Ole Martin Ruud <[email protected]> Co-authored-by: Pavan Kumar Sunkara <[email protected]>
edition = "2018" | ||
authors = [ | ||
"Kevin K. <[email protected]>", | ||
"Pavan Kumar Sunkara <[email protected]>", |
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.
We exist as well :p
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.
I have been meaning to just remove all the names and put "Clap Contributors". What do you think?
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.
That was going to be my next suggestion. The Clap Team or Clap Maintainers
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.
I would like to propose leave @kbknapp - as original author of these crates - and @TeXitoi (in clap_derive/Cargo.toml
) - as original author of the derive; and then put "Clap Contributors". I want to highlight them because they have (or had) been putting admirable amount of efforts into these crates from the very beginning, even thought the crates weren't so hypy and popular back then.
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.
That sounds fine to me as well. I'd rather go with Maintainers though than contributors. There's a subtle difference
use std::io::Write; | ||
|
||
// Internal | ||
use clap::*; |
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.
Import only what we require not the entire set
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.
Will fix in a new PR.
Build succeeded
|
I have copied the code from clap_generate and refactored the structure a bit.
This new structure will allow people to write their own generators using our
Generator
trait which will contain some helpers (Still working on polishing them).