Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

upgrade clap, or move away from it #176

Closed
untitaker opened this issue Oct 26, 2024 · 5 comments · Fixed by #179
Closed

upgrade clap, or move away from it #176

untitaker opened this issue Oct 26, 2024 · 5 comments · Fixed by #179
Labels
good first issue Good for newcomers help wanted This is a call for feedback or is not going to happen without third-party contribution

Comments

@untitaker
Copy link
Owner

clap 4.0 is out, and hyperlink is out of date

however, clap 5.0 seems to be around the corner as well

should we just move to the argh crate? I'm a big sucker for binary size, and the amount of dependencies and upgrading churn added by clap is starting to piss me off

so many questions

@untitaker untitaker added help wanted This is a call for feedback or is not going to happen without third-party contribution good first issue Good for newcomers labels Oct 26, 2024
@oylenshpeegul
Copy link
Contributor

I've been a fan of clap's derive interface since it was called structopt. I had never heard of argh before seeing this ticket, so I decided to have a look. I made branch for each

https://github.com/oylenshpeegul/hyperlink/tree/clap-v4

https://github.com/oylenshpeegul/hyperlink/tree/argh

Changing from clap 3 to 4 wasn't too bad. Let's hope changing to clap 5 will be even easier.

@untitaker
Copy link
Owner Author

neat. what's the release binary size?

@oylenshpeegul
Copy link
Contributor

❯ ls -lh target/release/hyperlink
-rwxr-xr-x 2 tim tim 1.9M Oct 28 15:21 target/release/hyperlink

@oylenshpeegul
Copy link
Contributor

Not much of a difference on my machine

argh
❯ ls -lh target/release/hyperlink
-rwxr-xr-x 2 tim tim 1.9M Oct 28 15:21 target/release/hyperlink

clap-v4
❯ ls -lh target/release/hyperlink
-rwxr-xr-x 2 tim tim 2.2M Oct 28 15:27 target/release/hyperlink

clap-v3
❯ ls -lh target/release/hyperlink
-rwxr-xr-x 2 tim tim 2.2M Oct 28 15:29 target/release/hyperlink

@untitaker
Copy link
Owner Author

a win is a win, feel free to make a PR for argh, for as long as the output is roughly the same and the CLI doesn't have breaking changes

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
good first issue Good for newcomers help wanted This is a call for feedback or is not going to happen without third-party contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants