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

Move to Clap 3 #2838

Closed
tertsdiepraam opened this issue Jan 1, 2022 · 4 comments · Fixed by #2863
Closed

Move to Clap 3 #2838

tertsdiepraam opened this issue Jan 1, 2022 · 4 comments · Fixed by #2863

Comments

@tertsdiepraam
Copy link
Member

tertsdiepraam commented Jan 1, 2022

We've been waiting for this for a long time: Clap 3 has been released (announcement)!

I think we can start porting the utils to Clap 3. Now, this should be fairly simple. However, some flags have changed meaning so we should test the changes thoroughly, especially with some complex arguments.

One of the features that we've been waiting for is AppSettings::InferLongArgs which should be turned on for (almost?) all utils to match GNU behaviour. Glancing the docs, I think the wrap_help and cargo features should be enabled by default for all utils.

Before porting a util, please be sure to check out the Clap 2 to 3 migration guide in the changelog.

Clap now also has the derive feature. We could try this out with some smaller utils, but we should only use this if we can fully match the functionality of the builder API.

Resources

@sylvestre
Copy link
Contributor

@tertsdiepraam did you try to port one ?
thanks

@tertsdiepraam
Copy link
Member Author

Not yet. I have exams coming up but after that I hope to port a few

@tertsdiepraam
Copy link
Member Author

I've just realized this is slightly more complicated than I thought. Because we call the clap apps from the utils in the coreutils binary, all clap versions must be the same, so we have to do all of them at the same time...

I think the best way to do this is to open a separate branch and update them there.

@tertsdiepraam tertsdiepraam linked a pull request Jan 11, 2022 that will close this issue
@sylvestre
Copy link
Contributor

Bravo for this achievement :)

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

Successfully merging a pull request may close this issue.

2 participants