dune
dune copied to clipboard
Upgrade cmdliner fork to 1.1.1
We still need a fork to support alias
but this brings the upstream part to 1.1.1. The main addition is builtin support of groups through the Cmdliner.Cmd
API.
Benefits include:
- we get closer to upstream
cmdliner
- help pages like
dune ocaml --help
are now more useful
This commit contains several things:
- an update of the vendored copy (to be reviewed separately),
- a port of
bin/
to theCmdliner.Cmd
API, - test updates, mostly typographic.
I'll put comments with places to discuss. The PR on cmdliner is https://github.com/ocaml-dune/cmdliner/pull/1.
Actually, regarding displaying command names or not, this is a feature that we introduced in our fork to implement groups in #3936. So it's not a regression in cmdliner. I'd rather keep the vanilla cmdliner code rather than patch it to keep the behaviour we introduced.
To clarify, it means that the first line of the message if
dune: TARGET... arguments: unclosed parenthesis at end of input
rather than
dune build: TARGET... arguments: unclosed parenthesis at end of input
but it's ok since the following lines are
Usage: dune build [OPTION]... [TARGET]...
Try `dune build --help' or `dune --help' for more information.
I'm in favor of dropping the command name patch since it doesn't hinder the error message and is easier to maintain.
Thanks! I've closed the cmdliner issue, will merge the ocaml-dune/cmdliner PR, and take care of the rest here.