The "forever beta" issue

That specific issue seems to be just a module renaming, so patching it in opam 1.2 is fairly trivial:

From a1476be0edabf16584bc96c010f5bfe58d2950ec Mon Sep 17 00:00:00 2001
From: Louis Gesbert <louis.gesbert@ocamlpro.com>
Date: Fri, 13 Apr 2018 11:46:59 +0200
Subject: [PATCH] Fix compilation with recent versions of dose and cmdliner

---
 src/client/opamArg.ml    | 12 ++++++------
 src/core/opamCompiler.ml |  2 +-
 src/core/opamFilter.ml   |  2 +-
 src/core/opamPackage.ml  |  2 +-
 src/solver/opamCudf.ml   |  2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/client/opamArg.ml b/src/client/opamArg.ml
index 7a8f0bdd..0c140224 100644
--- a/src/client/opamArg.ml
+++ b/src/client/opamArg.ml
@@ -379,9 +379,9 @@ let mk_flag ?section flags doc =
   let doc = Arg.info ?docs:section ~doc flags in
   Arg.(value & flag & doc)
 
-let mk_opt ?section ?vopt flags value doc conv default =
+let mk_opt ?section ?vopt flags value doc xconv default =
   let doc = Arg.info ?docs:section ~docv:value ~doc flags in
-  Arg.(value & opt ?vopt conv default & doc)
+  Arg.(value & opt ?vopt xconv default & doc)
 
 let mk_tristate_opt ?section flags value doc auto default =
   let doc = Arg.info ?docs:section ~docv:value ~doc flags in
@@ -459,13 +459,13 @@ let term_info title ~doc ~man =
   let man = man @ help_sections in
   Term.info ~sdocs:global_option_section ~docs:"COMMANDS" ~doc ~man title
 
-let arg_list name doc conv =
+let arg_list name doc xconv =
   let doc = Arg.info ~docv:name ~doc [] in
-  Arg.(value & pos_all conv [] & doc)
+  Arg.(value & pos_all xconv [] & doc)
 
-let nonempty_arg_list name doc conv =
+let nonempty_arg_list name doc xconv =
   let doc = Arg.info ~docv:name ~doc [] in
-  Arg.(non_empty & pos_all conv [] & doc)
+  Arg.(non_empty & pos_all xconv [] & doc)
 
 (* Common flags *)
 let print_short_flag =
diff --git a/src/core/opamCompiler.ml b/src/core/opamCompiler.ml
index 41783113..c7beb935 100644
--- a/src/core/opamCompiler.ml
+++ b/src/core/opamCompiler.ml
@@ -30,7 +30,7 @@ module Version = struct
 
   type constr = (OpamFormula.relop * t) OpamFormula.formula
 
-  let compare v1 v2 = Debian.Version.compare (to_string v1) (to_string v2)
+  let compare v1 v2 = Versioning.Debian.compare (to_string v1) (to_string v2)
 
   let eval_relop relop v1 v2 = OpamFormula.check_relop relop (compare v1 v2)
 
diff --git a/src/core/opamFilter.ml b/src/core/opamFilter.ml
index 0e919e74..ebce0903 100644
--- a/src/core/opamFilter.ml
+++ b/src/core/opamFilter.ml
@@ -203,7 +203,7 @@ let rec reduce_aux env = function
      | FUndef, _ | _, FUndef -> FUndef
      | e,f ->
        FBool (OpamFormula.check_relop relop
-                (Debian.Version.compare (value_string e) (value_string f))))
+                (Versioning.Debian.compare (value_string e) (value_string f))))
   | FAnd (e,f) -> logop2 (&&) false (reduce env e) (reduce env f)
   | FOr (e,f) -> logop2 (||) true (reduce env e) (reduce env f)
   | FNot e -> logop1 not (reduce env e)
diff --git a/src/core/opamPackage.ml b/src/core/opamPackage.ml
index 56605bbf..83908961 100644
--- a/src/core/opamPackage.ml
+++ b/src/core/opamPackage.ml
@@ -29,7 +29,7 @@ module Version = struct
 
   let of_string x = x
 
-  let compare = Debian.Version.compare
+  let compare = Versioning.Debian.compare
 
   let to_json x =
     `String (to_string x)
diff --git a/src/solver/opamCudf.ml b/src/solver/opamCudf.ml
index 62ea551d..f7903520 100644
--- a/src/solver/opamCudf.ml
+++ b/src/solver/opamCudf.ml
@@ -611,7 +611,7 @@ let check_cudf_version =
           `Compat
         | s::_ ->
           match OpamMisc.split s ' ' with
-          | "aspcud"::_::v::_ when Debian.Version.compare v "1.9" >= 0 ->
+          | "aspcud"::_::v::_ when Versioning.Debian.compare v "1.9" >= 0 ->
             log "Solver is aspcud > 1.9: using latest version criteria";
             `Latest
           | _ ->
-- 
2.11.0

The fix is not really needed on opam-repository, since there is the 1.3 version of opam-lib which already has it.

1 Like