mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
Merge pull request #258 from AltGr/update-cmdliner
Upgrade cmdliner to 1.1 (some API changes)
This commit is contained in:
commit
e7181b18b1
@ -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)))
|
||||
|
@ -1,4 +1,3 @@
|
||||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.6.0"
|
||||
synopsis:
|
||||
@ -26,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"}
|
||||
|
@ -1,4 +1,3 @@
|
||||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.6.0"
|
||||
synopsis:
|
||||
@ -13,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"}
|
||||
@ -36,3 +35,4 @@ build: [
|
||||
]
|
||||
]
|
||||
dev-repo: "git+https://github.com/CatalaLang/catala.git"
|
||||
depexts: ["ninja-build"] {os-family = "debian"}
|
||||
|
@ -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
|
||||
|
@ -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}*)
|
||||
|
||||
|
@ -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}*)
|
||||
|
||||
|
111
dune-project
111
dune-project
@ -4,7 +4,7 @@
|
||||
|
||||
(version 0.6.0)
|
||||
|
||||
(generate_opam_files true)
|
||||
(generate_opam_files false)
|
||||
|
||||
(formatting)
|
||||
|
||||
@ -27,113 +27,4 @@
|
||||
|
||||
(license Apache-2.0)
|
||||
|
||||
(package
|
||||
(name catala)
|
||||
(synopsis
|
||||
"Compiler and library for the literate programming language for tax code specification")
|
||||
(description
|
||||
"Catala is a domain-specific language for deriving faithful-by-construction algorithms from legislative texts. See https://catala-lang.org for more information")
|
||||
(depends
|
||||
(ocaml
|
||||
(>= 4.11.0))
|
||||
(ANSITerminal
|
||||
(>= 0.8.2))
|
||||
(sedlex
|
||||
(>= 2.4))
|
||||
(menhir
|
||||
(>= 20200211))
|
||||
(menhirLib
|
||||
(>= 20200211))
|
||||
(unionFind
|
||||
(>= 20200320))
|
||||
(bindlib
|
||||
(>= 5.0.1))
|
||||
(cmdliner
|
||||
(= 1.0.4))
|
||||
(re
|
||||
(>= 1.9.0))
|
||||
(zarith
|
||||
(>= 1.12))
|
||||
(zarith_stubs_js
|
||||
(>= v0.14.1))
|
||||
(ocamlgraph
|
||||
(>= 1.8.8))
|
||||
(calendar
|
||||
(>= 2.04))
|
||||
(visitors
|
||||
(>= 20200210))
|
||||
(benchmark
|
||||
(>= 1.6))
|
||||
(js_of_ocaml-ppx
|
||||
(>= 3.8.0))
|
||||
(camomile
|
||||
(>= 1.0.2))
|
||||
(cppo
|
||||
(>= 1))
|
||||
(obelisk :dev)
|
||||
(alcotest
|
||||
(and
|
||||
:with-test
|
||||
(>= 1.5.0)))
|
||||
(ocamlformat
|
||||
(and
|
||||
:dev
|
||||
(= 0.20.1))))
|
||||
(depopts
|
||||
z3)
|
||||
(conflicts
|
||||
(z3 (< 4.8.11))))
|
||||
|
||||
(package
|
||||
(name french_law)
|
||||
(authors "Denis Merigoux")
|
||||
(synopsis
|
||||
"A collection of algorithms and computations defined by French law")
|
||||
(description
|
||||
"This library contains the implementations of algorithmic portions of French law. The library source code was generated from Catala annotations of the relevant portions of the French law, see https://catala-lang.org")
|
||||
(depends
|
||||
(ocaml
|
||||
(>= 4.11.0))
|
||||
(catala
|
||||
(= :version))
|
||||
(conf-npm :dev)))
|
||||
|
||||
(package
|
||||
(name clerk)
|
||||
(authors "Emile Rolley" "Denis Merigoux")
|
||||
(synopsis
|
||||
"Build system for Catala, a specification language for tax and social benefits computation rules")
|
||||
(description
|
||||
"Clerk is a build system for Catala, a specification language for tax and social benefits computation rules, see https://catala-lang.org")
|
||||
(depends
|
||||
(ocaml
|
||||
(>= 4.11.0))
|
||||
(cmdliner
|
||||
(= 1.0.4))
|
||||
(re
|
||||
(>= 1.9.0))
|
||||
(ANSITerminal
|
||||
(>= 0.8.2))
|
||||
(alcotest
|
||||
(and
|
||||
:with-test
|
||||
(>= 1.5.0)))
|
||||
(catala
|
||||
(= :version))
|
||||
(ninja_utils
|
||||
(= :version))))
|
||||
|
||||
(package
|
||||
(name ninja_utils)
|
||||
(authors "Emile Rolley")
|
||||
(synopsis
|
||||
"A collection of utility functions used to generate Ninja build files")
|
||||
(description
|
||||
"This library contains the implementations of utility functions used to generate Ninja build files -- see https://ninja-build.org. It's currently used by the Catala build system (see https://github.com/CatalaLang/catala/tree/master/build_system)")
|
||||
(depends
|
||||
(ocaml
|
||||
(>= 4.11.0))
|
||||
(re
|
||||
(>= 1.10.3))))
|
||||
|
||||
(using menhir 2.1)
|
||||
|
@ -1,4 +1,3 @@
|
||||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.6.0"
|
||||
synopsis: "A collection of algorithms and computations defined by French law"
|
||||
|
@ -1,4 +1,3 @@
|
||||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.6.0"
|
||||
synopsis:
|
||||
|
Loading…
Reference in New Issue
Block a user