Replace gumdrop with clap v3 (beta 1) #330
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes: #298
I've started the work to try to replace gumdrop with clap v3.
#[option(...
with#[clap...
since clap supports this with clap_deriveAfter replacing these, got stuck on core/src/command/entrypoint.rs where the compilation is failing because changes in the file. Especially the command property of this struct. Couldn't find an equivalent way to replace it with clap. Tried to use the #[clap(subcommand)] attribute on this property but it seems make the compiler not to recognize the Cmd type
So I believe this is a good starting point but I believe some more fundamental changes will be required in order to replace gumdrop with clap. Especially things related to help and usage which clap supports. So maybe things that currently exist in abscissa like core/src/command -> entrypoint, help and usage might not need to exist or be refactored quite a bit.
Another challenge is that clap also has a concept of
App
but it's more related to command line arguments and the executable, so it might differ from Abscissa'sCliApplication
that can track theState
.Anyways, I think we can use this draft PR to have discussions on what is the best way to proceed and I'd be happy to help out with this effort.