From 17c5f5c424ec04fd5576c042fe1e70aff07e4636 Mon Sep 17 00:00:00 2001 From: Artem Pianykh Date: Thu, 30 Jan 2020 03:54:13 -0800 Subject: [PATCH] [build] Update to dune 2 Summary: Update from dune 1 to dune 2. The change was mostly straightforward except that change to (modes ...) default to exe only was somewhat unexpected. Anyhow, with the community moving to dune 2 it's good to keep up. Reviewed By: ngorogiannis Differential Revision: D19605895 fbshipit-source-id: 1f9830de8 --- infer/src/c_stubs/dune | 2 +- infer/src/c_stubs/dune-project | 2 +- infer/src/deadcode/dune.in | 1 + infer/src/dune-project | 2 +- infer/src/dune-workspace.in | 2 +- infer/src/dune.in | 2 ++ infer/src/scripts/dune.in | 1 + opam | 3 ++- opam.locked | 24 +++++++++++++++--------- 9 files changed, 25 insertions(+), 14 deletions(-) diff --git a/infer/src/c_stubs/dune b/infer/src/c_stubs/dune index 4e363f6f3..192d4d51d 100644 --- a/infer/src/c_stubs/dune +++ b/infer/src/c_stubs/dune @@ -12,7 +12,7 @@ Format.sprintf (library (name InferCStubs) (public_name InferCStubs) - (c_names fnv64_hash) + (foreign_stubs (language c) (names fnv64_hash)) ) |} |> Jbuild_plugin.V1.send diff --git a/infer/src/c_stubs/dune-project b/infer/src/c_stubs/dune-project index 4fd7479b2..180003629 100644 --- a/infer/src/c_stubs/dune-project +++ b/infer/src/c_stubs/dune-project @@ -1,2 +1,2 @@ -(lang dune 1.10) +(lang dune 2.0) (name CStubs) diff --git a/infer/src/deadcode/dune.in b/infer/src/deadcode/dune.in index 8f6352618..c3e2431d2 100644 --- a/infer/src/deadcode/dune.in +++ b/infer/src/deadcode/dune.in @@ -12,6 +12,7 @@ Format.sprintf {| (executable (name all_infer_in_one_file) + (modes byte) (flags (%s -w +60)) (ocamlopt_flags (%s)) (libraries %s) diff --git a/infer/src/dune-project b/infer/src/dune-project index 0b09661e5..b5b88dc0f 100644 --- a/infer/src/dune-project +++ b/infer/src/dune-project @@ -1,2 +1,2 @@ -(lang dune 1.0) +(lang dune 2.0) (using menhir 1.0) diff --git a/infer/src/dune-workspace.in b/infer/src/dune-workspace.in index ddf1b3cf3..327d6a99b 100644 --- a/infer/src/dune-workspace.in +++ b/infer/src/dune-workspace.in @@ -1,4 +1,4 @@ -(lang dune 1.0) +(lang dune 2.0) ; Copyright (c) Facebook, Inc. and its affiliates. ; ; This source code is licensed under the MIT license found in the diff --git a/infer/src/dune.in b/infer/src/dune.in index 20c84a7a6..144f5c5c7 100644 --- a/infer/src/dune.in +++ b/infer/src/dune.in @@ -84,6 +84,7 @@ let stanzas = {| (executables (names %s) + (modes byte exe) (flags (%s -open InferModules)) (ocamlopt_flags (%s)) (libraries InferModules) @@ -99,6 +100,7 @@ let stanzas = {| (executable (name infertop) + (modes byte) (flags (%s)) (libraries utop InferModules) (modules Infertop) diff --git a/infer/src/scripts/dune.in b/infer/src/scripts/dune.in index efee68bc7..df528ecb1 100644 --- a/infer/src/scripts/dune.in +++ b/infer/src/scripts/dune.in @@ -11,6 +11,7 @@ Format.sprintf {| (executable (name checkCopyright) + (modes byte exe) (flags (%s)) (libraries core str) (preprocess (pps ppx_compare)) diff --git a/opam b/opam index b8607ed19..1440f4cc9 100644 --- a/opam +++ b/opam @@ -30,7 +30,7 @@ depends: [ "conf-sqlite3" {build} "conf-zlib" {build} "ctypes" {>="0.9.2"} - "dune" {build & >="1.0"} + "dune" {build & >="2.0"} "javalib" {>="3.2"} "mlgmpidl" {>="1.2.12"} "mtime" @@ -39,6 +39,7 @@ depends: [ "ocamlgraph" "ounit" {>="2.0.5"} "parmap" {>="1.0-rc8"} + "ppx_compare" {>= "v0.12.0" & < "v0.13"} "ppx_deriving" {>="4.1"} "ppx_fields_conv" {>="v0.12.0" & < "v0.13"} "ppx_let" {>="v0.12.0" & < "v0.13"} diff --git a/opam.locked b/opam.locked index 4fd898647..4bd4d1eb0 100644 --- a/opam.locked +++ b/opam.locked @@ -20,7 +20,7 @@ install: [ [make "install"] ] depends: [ - "ANSITerminal" {= "0.8.1"} + "ANSITerminal" {= "0.8.2"} "async" {= "v0.12.0"} "async_extra" {= "v0.12.0"} "async_kernel" {= "v0.12.0"} @@ -39,11 +39,13 @@ depends: [ "base_quickcheck" {= "v0.12.1"} "bin_prot" {= "v0.12.0"} "biniou" {= "1.2.1"} - "camlzip" {= "1.09"} + "camlidl" {= "1.07"} + "camlzip" {= "1.10"} "cmdliner" {= "1.0.4"} "conf-autoconf" {= "0.1"} "conf-gmp" {= "1"} "conf-m4" {= "1"} + "conf-mpfr" {= "1"} "conf-perl" {= "1"} "conf-pkg-config" {= "1.1"} "conf-sqlite3" {= "1"} @@ -52,18 +54,22 @@ depends: [ "core" {= "v0.12.4"} "core_kernel" {= "v0.12.3"} "cppo" {= "1.6.6"} - "ctypes" {= "0.15.1"} - "dune" {= "1.11.4"} - "dune-configurator" {= "1.0.0"} + "ctypes" {= "0.16.0"} + "dune" {= "2.1.3"} + "dune-configurator" {= "2.1.3"} + "dune-private-libs" {= "2.1.3"} "easy-format" {= "1.3.2"} "extlib" {= "1.7.6"} "fieldslib" {= "v0.12.0"} "integers" {= "0.3.0"} "jane-street-headers" {= "v0.12.0"} "javalib" {= "3.2"} - "jbuilder" {= "transition"} + "jbuilder" {= "1.0+beta20.2"} "jst-config" {= "v0.12.0"} - "menhir" {= "20190924"} + "menhir" {= "20200123"} + "menhirLib" {= "20200123"} + "menhirSdk" {= "20200123"} + "mlgmpidl" {= "1.2.12"} "mtime" {= "1.2.0"} "num" {= "1.3"} "ocaml" {= "4.08.1"} @@ -74,8 +80,8 @@ depends: [ "ocamlfind" {= "1.8.1"} "ocamlgraph" {= "1.8.8"} "octavius" {= "1.2.2"} - "ounit" {= "2.2.1"} - "ounit2" {= "2.2.1"} + "ounit" {= "2.2.2"} + "ounit2" {= "2.2.2"} "parmap" {= "1.0-rc11"} "parsexp" {= "v0.12.0"} "ppx_assert" {= "v0.12.0"}