-
Notifications
You must be signed in to change notification settings - Fork 659
☂️ Move Rome CLI to use bpaf
#4397
Comments
Which other candidates did you review? |
Another option is Another one was Here's a great community project that compares some libraries: https://github.com/rosetta-rs/argparse-rosetta-rs I like
|
I agree with your conclusion on Can't wait to see |
Can you tell me a bit more what makes |
Hi @pacak , thank you for reaching out! :) The markup!{
"Something"<Emphasis>"bold"</Emphasis>" or "<Dim>"dimmed"</Dim>
} This macro creates Here's some internal, useful links:
|
I see. I'm adding something similar with goals to write to terminal, markdown (well, technically a mix of html and markdown) and manpages, there should be a way to get those two to talk to each other :) |
Description
I have been experimenting with some possible CLI libraries (more potent than
pico_args
), and I findbpaf
really pleasant to work with!I did a small PoC and it seems that it can work inside the Rome code base, although there are some restrictions and compromises that we have to make:
markup!
for the help section;bpaf
error messages when the parsing of an argument fails;I am happy to accept the trade-off!
bpaf
allows to define arguments in two ways: combinatoric orderive
. For Rome, thederive
feature works better. The combinatoric way forces you to define every type inside a struct, which differs from what we're looking for inside Rome.Although, before moving everything to
bpaf
, some more work needs to be done to lay off the foundations and make the migration smoother.Below the list of things that we need to do:
First batch:
ignore
arguments #4398Option
#4399rome_deserialize
for formatter options #4400Second batch:
format
subcommand viabpaf
check
subcommand viabpaf
ci
subcommand viabpaf
rage
subcommand viabpaf
The text was updated successfully, but these errors were encountered: