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

Update clap to v4 #498

Merged
merged 5 commits into from
Oct 1, 2022
Merged

Update clap to v4 #498

merged 5 commits into from
Oct 1, 2022

Conversation

dnaka91
Copy link
Contributor

@dnaka91 dnaka91 commented Sep 30, 2022

Updating the clap crate to the just released v4.0. Am currently updating many of my own crates to v4 and found issue #496 as part of the Hacktoberfest event.

I tried to keep the implementation as much as-is as possible, but especially clap's help message styling changed a lot with v4.

You might wonder the AppSettings::DeriveDisplayOrder being removed, but it is not needed anymore, as this is the new default now. Besides that, I used the ValueEnum derive a lot to have the possible values of enums provided to clap. This may have invaded some modules with clap use statements, so just let me know if you don't want that, and I'll think of something else.

This is my first contribution to this project, so I just wanted to say: Thank you for this awesome project, I'm using it regularly for my project and love it 🚀.

@codecov
Copy link

codecov bot commented Oct 1, 2022

Codecov Report

Base: 61.02% // Head: 59.87% // Decreases project coverage by -1.15% ⚠️

Coverage data is based on head (64426eb) compared to base (1df4bae).
Patch has no changes to coverable lines.

❗ Current head 64426eb differs from pull request most recent head 71a1622. Consider uploading reports for the commit 71a1622 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #498      +/-   ##
==========================================
- Coverage   61.02%   59.87%   -1.16%     
==========================================
  Files          80       80              
  Lines        1827     1817      -10     
==========================================
- Hits         1115     1088      -27     
- Misses        712      729      +17     
Impacted Files Coverage Δ
src/cli.rs 78.84% <ø> (ø)
src/cli/rust_releases_opts.rs 36.36% <ø> (ø)
src/config.rs 60.45% <ø> (-7.68%) ⬇️
src/config/list.rs 0.00% <ø> (-46.16%) ⬇️
src/log_level.rs 70.96% <ø> (-7.83%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@foresterre foresterre left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

src/config.rs Outdated Show resolved Hide resolved
@foresterre
Copy link
Owner

bors r+

@foresterre
Copy link
Owner

Thank you for the changes!

@bors bors bot merged commit 02d5ae6 into foresterre:main Oct 1, 2022
@dnaka91 dnaka91 deleted the clap-v4 branch October 1, 2022 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants