|
|
ffc5bbe |
From ee1bdb724b4c6fc31d302a22daca9ca0a5e9d9eb Mon Sep 17 00:00:00 2001
|
|
|
ffc5bbe |
From: =?UTF-8?q?Daniel=20B=C3=BCnzli?= <daniel.buenzli@erratique.ch>
|
|
|
ffc5bbe |
Date: Thu, 3 Feb 2022 20:54:34 +0100
|
|
|
ffc5bbe |
Subject: [PATCH] Handle cmdliner 1.1.0 deprecations.
|
|
|
ffc5bbe |
|
|
|
ffc5bbe |
---
|
|
|
ffc5bbe |
B0.ml | 2 +-
|
|
|
ffc5bbe |
CHANGES.md | 4 ++++
|
|
|
ffc5bbe |
opam | 4 ++--
|
|
|
ffc5bbe |
test/utftrip.ml | 10 +++++-----
|
|
|
ffc5bbe |
4 files changed, 12 insertions(+), 8 deletions(-)
|
|
|
ffc5bbe |
|
|
|
ffc5bbe |
diff --git a/B0.ml b/B0.ml
|
|
|
ffc5bbe |
index b04a3bd..3334a12 100644
|
|
|
ffc5bbe |
--- a/B0.ml
|
|
|
ffc5bbe |
+++ b/B0.ml
|
|
|
ffc5bbe |
@@ -47,7 +47,7 @@ let default =
|
|
|
ffc5bbe |
["unicode"; "text"; "utf-8"; "utf-16"; "codec"; "org:erratique"]
|
|
|
ffc5bbe |
|> add B0_opam.Meta.depopts ["cmdliner", ""]
|
|
|
ffc5bbe |
|> add B0_opam.Meta.conflicts
|
|
|
ffc5bbe |
- [ "cmdliner", {|< "0.9.8"|}]
|
|
|
ffc5bbe |
+ [ "cmdliner", {|< "1.1.0"|}]
|
|
|
ffc5bbe |
|> add B0_opam.Meta.depends
|
|
|
ffc5bbe |
[ "ocaml", {|>= "4.03.0"|};
|
|
|
ffc5bbe |
"ocamlfind", {|build|};
|
|
|
ffc5bbe |
diff --git a/CHANGES.md b/CHANGES.md
|
|
|
ffc5bbe |
index 50b1554..76778e5 100644
|
|
|
ffc5bbe |
--- a/CHANGES.md
|
|
|
ffc5bbe |
+++ b/CHANGES.md
|
|
|
ffc5bbe |
@@ -1,3 +1,7 @@
|
|
|
ffc5bbe |
+
|
|
|
ffc5bbe |
+
|
|
|
ffc5bbe |
+- Handle cmdliner 1.1.0 deprecations.
|
|
|
ffc5bbe |
+
|
|
|
ffc5bbe |
v1.0.3 2022-02-03
|
|
|
ffc5bbe |
-----------------
|
|
|
ffc5bbe |
|
|
|
ffc5bbe |
diff --git a/opam b/opam
|
|
|
ffc5bbe |
index 48dfb90..d06760c 100644
|
|
|
ffc5bbe |
--- a/opam
|
|
|
ffc5bbe |
+++ b/opam
|
|
|
ffc5bbe |
@@ -14,7 +14,7 @@ depends: ["ocaml" {>= "4.03.0"}
|
|
|
ffc5bbe |
"ocamlbuild" {build}
|
|
|
ffc5bbe |
"topkg" {build & >= "1.0.3"}]
|
|
|
ffc5bbe |
depopts: ["cmdliner"]
|
|
|
ffc5bbe |
-conflicts: ["cmdliner" {< "0.9.8"}]
|
|
|
ffc5bbe |
+conflicts: ["cmdliner" {< "1.1.0"}]
|
|
|
ffc5bbe |
build: [["ocaml" "pkg/pkg.ml" "build" "--dev-pkg" "%{dev}%"
|
|
|
ffc5bbe |
"--with-cmdliner" "%{cmdliner:installed}%"]]
|
|
|
ffc5bbe |
description: """
|
|
|
ffc5bbe |
@@ -26,7 +26,7 @@ character position tracking and support newline normalization.
|
|
|
ffc5bbe |
Functions are also provided to fold over the characters of UTF encoded
|
|
|
ffc5bbe |
OCaml string values and to directly encode characters in OCaml
|
|
|
ffc5bbe |
Buffer.t values. **Note** that since OCaml 4.14, that functionality
|
|
|
ffc5bbe |
-can be found in the Stdlib and you are encouraged to migrate to.
|
|
|
ffc5bbe |
+can be found in the Stdlib and you are encouraged to migrate to it.
|
|
|
ffc5bbe |
|
|
|
ffc5bbe |
Uutf has no dependency and is distributed under the ISC license.
|
|
|
ffc5bbe |
|
|
|
ffc5bbe |
diff --git a/test/utftrip.ml b/test/utftrip.ml
|
|
|
ffc5bbe |
index 28ba81b..361526e 100644
|
|
|
ffc5bbe |
--- a/test/utftrip.ml
|
|
|
ffc5bbe |
+++ b/test/utftrip.ml
|
|
|
ffc5bbe |
@@ -382,12 +382,12 @@ let cmd =
|
|
|
ffc5bbe |
See http://erratique.ch/software/uutf for contact
|
|
|
ffc5bbe |
information."; ]
|
|
|
ffc5bbe |
in
|
|
|
ffc5bbe |
- Term.(pure do_cmd $ cmd $ file $ sin $ sout $ use_unix $ usize $
|
|
|
ffc5bbe |
- ienc $ oenc $ nln $ rseed $ rcount),
|
|
|
ffc5bbe |
- Term.info "utftrip" ~version:"%%VERSION%%" ~doc ~man
|
|
|
ffc5bbe |
+ Cmd.v (Cmd.info "utftrip" ~version:"%%VERSION%%" ~doc ~man)
|
|
|
ffc5bbe |
+ Term.(const do_cmd $ cmd $ file $ sin $ sout $ use_unix $ usize $
|
|
|
ffc5bbe |
+ ienc $ oenc $ nln $ rseed $ rcount)
|
|
|
ffc5bbe |
|
|
|
ffc5bbe |
-let () = match Term.eval cmd with
|
|
|
ffc5bbe |
-| `Error _ -> exit 1
|
|
|
ffc5bbe |
+let () = match Cmd.eval_value cmd with
|
|
|
ffc5bbe |
+| Error _ -> exit 1
|
|
|
ffc5bbe |
| _ -> if !input_malformed then exit 2 else exit 0
|
|
|
ffc5bbe |
|
|
|
ffc5bbe |
(*---------------------------------------------------------------------------
|