Upcoming Cmdliner 2.0 changes that need your attention

If you are a user of cmdliner note that cmdliner 2.0 – in exchange for auto-completion support – will remove the ability to specify command and options names by unambiguous prefixes according to this plan of action.

If you are horrified by it please chime in on the issue.

18 Likes

Other changes you may want to pay attention to is that cmdliner 2.0 will:

  1. Remove deprecated identifiers.
  2. Make the Arg.conv type abstract[1].

If you happen to be walking around your cmdliner usage or making a new cli these days, pay particular attention to 2. as the concrete type has been deprecated since 2017 but sadly it was never possible to make it a visible deprecation (OCaml compiler help us! :man_bowing:).

Note that both 1. and 2. can be resolved now by using cmdliner.1.3.0, there are a few instructions here. It’s no guaranteed, but if you are on opam I may have filed an issue in your issue tracker :waving_hand:.


P.S. I think there’s not a single occurence where I did not eventually regret making a public type concrete.


  1. So that completion behaviours can be defined at that level; aswell as the documentation metavariable which you could specify with Arg.conv constructors for ages but would simply be dropped to return the concrete pair. ↩︎

1 Like