From 5ab38998d0e4e79484c405ba73d6c5156c357164 Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Thu, 30 May 2024 12:04:16 +0100 Subject: [PATCH] dune: enforce version +3 This enables more warnings and fixes opam metadata generation Signed-off-by: Pau Ruiz Safont --- dune-project | 2 +- message-switch-core.opam | 4 ++-- rrdd-plugin.opam | 5 +++-- xapi-rrd-transport-utils.opam | 5 +++-- xapi-rrdd-plugin.opam | 2 +- xapi-rrdd.opam | 5 +++-- xapi-stdext-date.opam | 4 ++-- xapi-stdext-encodings.opam | 4 ++-- xapi-stdext-pervasives.opam | 4 ++-- xapi-stdext-std.opam | 4 ++-- xapi-stdext-threads.opam | 4 ++-- xapi-stdext-unix.opam | 4 ++-- xapi-stdext-zerocheck.opam | 4 ++-- xapi-tracing-export.opam | 5 +++-- xapi-tracing.opam | 5 +++-- 15 files changed, 33 insertions(+), 28 deletions(-) diff --git a/dune-project b/dune-project index 0d4334ad429..ac02a1c296d 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,4 @@ -(lang dune 2.0) +(lang dune 3.0) (formatting (enabled_for ocaml)) (generate_opam_files true) diff --git a/message-switch-core.opam b/message-switch-core.opam index 6c17473a4ed..2d671053b9b 100644 --- a/message-switch-core.opam +++ b/message-switch-core.opam @@ -9,7 +9,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "astring" "cohttp" {>= "0.21.1"} "ppx_deriving_rpc" @@ -21,7 +21,7 @@ depends: [ "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/rrdd-plugin.opam b/rrdd-plugin.opam index 6474802ad22..6bab281c970 100644 --- a/rrdd-plugin.opam +++ b/rrdd-plugin.opam @@ -9,7 +9,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" "astring" "rpclib" @@ -21,9 +21,10 @@ depends: [ "xapi-stdext-unix" {= version} "xapi-idl" {= version} "xenstore_transport" + "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-rrd-transport-utils.opam b/xapi-rrd-transport-utils.opam index aa5bb44c8eb..261da91a4e3 100644 --- a/xapi-rrd-transport-utils.opam +++ b/xapi-rrd-transport-utils.opam @@ -9,15 +9,16 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" "cmdliner" "rrd-transport" {= version} "xapi-idl" {= version} "xapi-rrd" {= version} + "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-rrdd-plugin.opam b/xapi-rrdd-plugin.opam index 68a9ed509c5..b01d85a6da5 100644 --- a/xapi-rrdd-plugin.opam +++ b/xapi-rrdd-plugin.opam @@ -1,7 +1,7 @@ # This file is generated by dune, edit dune-project instead license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-rrdd.opam b/xapi-rrdd.opam index 3d7c6c5031c..824e9d725be 100644 --- a/xapi-rrdd.opam +++ b/xapi-rrdd.opam @@ -9,7 +9,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" {>= "4.02.0"} "dune-build-info" "astring" @@ -28,9 +28,10 @@ depends: [ "xapi-rrd" {= version} "xapi-stdext-threads" {= version} "xapi-stdext-unix" {= version} + "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-stdext-date.opam b/xapi-stdext-date.opam index a7f4951d856..10658f8b54e 100644 --- a/xapi-stdext-date.opam +++ b/xapi-stdext-date.opam @@ -7,7 +7,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" {>= "4.12"} "alcotest" {with-test} "astring" @@ -16,7 +16,7 @@ depends: [ "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-stdext-encodings.opam b/xapi-stdext-encodings.opam index c3538116761..51ef29fe35f 100644 --- a/xapi-stdext-encodings.opam +++ b/xapi-stdext-encodings.opam @@ -7,7 +7,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" {>= "4.13.0"} "alcotest" {>= "0.6.0" & with-test} "odoc" {with-doc} @@ -16,7 +16,7 @@ depends: [ "notty" {with-test} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-stdext-pervasives.opam b/xapi-stdext-pervasives.opam index 53fd4b34939..3dc2d169718 100644 --- a/xapi-stdext-pervasives.opam +++ b/xapi-stdext-pervasives.opam @@ -7,14 +7,14 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" {>= "4.08"} "logs" "odoc" {with-doc} "xapi-backtrace" ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-stdext-std.opam b/xapi-stdext-std.opam index 95b61c73e3e..4cee75aac36 100644 --- a/xapi-stdext-std.opam +++ b/xapi-stdext-std.opam @@ -7,13 +7,13 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" {>= "4.08.0"} "alcotest" {with-test} "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-stdext-threads.opam b/xapi-stdext-threads.opam index 9dcc9ff090c..714a2e01575 100644 --- a/xapi-stdext-threads.opam +++ b/xapi-stdext-threads.opam @@ -7,7 +7,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" "base-threads" "base-unix" @@ -15,7 +15,7 @@ depends: [ "xapi-stdext-pervasives" {= version} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-stdext-unix.opam b/xapi-stdext-unix.opam index f8e709afe7f..1d46f3ad75c 100644 --- a/xapi-stdext-unix.opam +++ b/xapi-stdext-unix.opam @@ -7,7 +7,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" {>= "4.12.0"} "base-unix" "fd-send-recv" {>= "2.0.0"} @@ -16,7 +16,7 @@ depends: [ "xapi-stdext-pervasives" {= version} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-stdext-zerocheck.opam b/xapi-stdext-zerocheck.opam index 30861bf3dc1..8f070a416f3 100644 --- a/xapi-stdext-zerocheck.opam +++ b/xapi-stdext-zerocheck.opam @@ -7,12 +7,12 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-tracing-export.opam b/xapi-tracing-export.opam index a32e53f4d9f..4ec270f6328 100644 --- a/xapi-tracing-export.opam +++ b/xapi-tracing-export.opam @@ -11,7 +11,7 @@ bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "ocaml" "cohttp-posix" - "dune" + "dune" {>= "3.0"} "cohttp" "rpclib" "ppx_deriving_rpc" @@ -21,9 +21,10 @@ depends: [ "xapi-stdext-unix" {= version} "xapi-tracing" {= version} "zstd" {= version} + "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/xapi-tracing.opam b/xapi-tracing.opam index 20bc1000611..f2dbbd2b132 100644 --- a/xapi-tracing.opam +++ b/xapi-tracing.opam @@ -10,16 +10,17 @@ homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "ocaml" - "dune" + "dune" {>= "3.0"} "alcotest" {with-test} "re" "uri" "uuid" {with-test} "xapi-log" {= version} "xapi-stdext-threads" {= version} + "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build"