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

Downgrade clap v4 to v3 in all binary targets #20

Closed
marceline-cramer opened this issue Jan 30, 2023 · 4 comments · Fixed by #84
Closed

Downgrade clap v4 to v3 in all binary targets #20

marceline-cramer opened this issue Jan 30, 2023 · 4 comments · Fixed by #84
Assignees
Labels
enhancement New feature or request

Comments

@marceline-cramer
Copy link
Collaborator

marceline-cramer commented Jan 30, 2023

I personally disagree with the clap developers' decision to change the theming of --help docs from these nice colored sections to monochrome text: clap-rs/clap#4132. I think that this hurts readability, and that strong color-coding will be important in Hearth when running hearth-ctl while in-space.

This unfortunately can't be reverted in clap v4. The clap devs may add in styling for docs in the future, but the future is not now. However, the structopt crate provides the same procedural macro-based argument parsing, but on clap v3, which has the old colored output.

Downgrading from clap v4 to clap v3 won't have any serious consequences on the argument parsing itself, so it's not like we're sacrificing features for this. However, if anyone prefers the uncolored clap v4 output over the colored clap v3 output, please pitch in your opinion in this issue so that we can discuss it more.

For now, I'm using clap v4 in #19.

If we do decide to use structopt, clap v4 will need to replaced in three of our crates:

  • hearth-client
  • hearth-server
  • hearth-ctl
@marceline-cramer marceline-cramer added enhancement New feature or request help wanted Extra attention is needed labels Jan 30, 2023
@MalekiRe
Copy link
Contributor

I prefer colored output

@airidaceae
Copy link
Collaborator

I'm completely fine with either. I can certainly see the colored output making it look more approachable and easy to use.

@marceline-cramer marceline-cramer removed the help wanted Extra attention is needed label Jan 30, 2023
@marceline-cramer
Copy link
Collaborator Author

Alright, this is open for solving then.

@marceline-cramer
Copy link
Collaborator Author

As it turns out clap v3 also has a derive macro. No need to use structopt!

@marceline-cramer marceline-cramer changed the title Replace clap v4 with structopt in all binary targets Downgrade clap v4 to v3 in all binary targets Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants