Upgrade Cmdliner dep

This commit is contained in:
Louis Gesbert 2022-05-04 17:37:03 +02:00
parent 4974628bf1
commit 6837af4e80
6 changed files with 11 additions and 15 deletions

View File

@ -134,8 +134,8 @@ let info =
"Please file bug reports at https://github.com/CatalaLang/catala/issues";
]
in
let exits = Term.default_exits @ [ Term.exit_info ~doc:"on error." 1 ] in
Term.info "clerk" ~version ~doc ~exits ~man
let exits = Cmd.Exit.defaults @ [ Cmd.Exit.info ~doc:"on error." 1 ] in
Cmd.info "clerk" ~version ~doc ~exits ~man
(**{1 Testing}*)
@ -799,7 +799,4 @@ let driver
Cli.error_print "The command \"%s\" is unknown to clerk." command;
1
let main () =
match Cmdliner.Term.eval (clerk_t driver, info) with
| `Ok 0 -> Cmdliner.Term.exit (`Ok 0)
| _ -> Cmdliner.Term.exit (`Error `Term)
let main () = exit (Cmdliner.Cmd.eval' (Cmdliner.Cmd.v info (clerk_t driver)))

View File

@ -25,7 +25,7 @@ depends: [
"menhirLib" {>= "20200211"}
"unionFind" {>= "20200320"}
"bindlib" {>= "5.0.1"}
"cmdliner" {= "1.0.4"}
"cmdliner" {>= "1.1.0"}
"re" {>= "1.9.0"}
"zarith" {>= "1.12"}
"zarith_stubs_js" {>= "v0.14.1"}

View File

@ -12,7 +12,7 @@ bug-reports: "https://github.com/CatalaLang/catala/issues"
depends: [
"dune" {>= "2.8"}
"ocaml" {>= "4.11.0"}
"cmdliner" {= "1.0.4"}
"cmdliner" {>= "1.1.0"}
"re" {>= "1.9.0"}
"ANSITerminal" {>= "0.8.2"}
"alcotest" {with-test & >= "1.5.0"}

View File

@ -412,8 +412,7 @@ let driver source_file (options : Cli.options) : int =
let main () =
let return_code =
Cmdliner.Term.eval (Cli.catala_t (fun f -> driver (FileName f)), Cli.info)
Cmdliner.Cmd.eval'
(Cmdliner.Cmd.v Cli.info (Cli.catala_t (fun f -> driver (FileName f))))
in
match return_code with
| `Ok 0 -> Cmdliner.Term.exit (`Ok 0)
| _ -> Cmdliner.Term.exit (`Error `Term)
exit return_code

View File

@ -315,8 +315,8 @@ let info =
"Please file bug reports at https://github.com/CatalaLang/catala/issues";
]
in
let exits = Term.default_exits @ [ Term.exit_info ~doc:"on error." 1 ] in
Term.info "catala" ~version ~doc ~exits ~man
let exits = Cmd.Exit.defaults @ [ Cmd.Exit.info ~doc:"on error." 1 ] in
Cmd.info "catala" ~version ~doc ~exits ~man
(**{1 Terminal formatting}*)

View File

@ -101,7 +101,7 @@ val catala_t : (string -> options -> 'a) -> 'a Cmdliner.Term.t
val set_option_globals : options -> unit
val version : string
val info : Cmdliner.Term.info
val info : Cmdliner.Cmd.info
(**{1 Terminal formatting}*)