From b71a4e933e2c70a06db5f7fad120b23f1c35d21c Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 29 Nov 2021 10:44:04 +0200 Subject: [PATCH 1/3] Fix dune-site in opam install by requiring dune 2.9 --- CHANGELOG.md | 1 + dune-project | 2 +- goblint.opam | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dbcb6d070..27381fad80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Added lower bounds to dependencies (zarith, ocaml-monadic, sha, conf-gmp). * Fixed ounit2 library for unit tests. * Disabled kernel regression tests when linux-headers couldn't be downloaded (e.g. in opam-repository opam-ci). +* Fixed dune-site in opam install by requiring dune 2.9. ## v1.1.0 diff --git a/dune-project b/dune-project index 6f99144fee..9f10591bef 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,4 @@ -(lang dune 2.8) +(lang dune 2.9); need 2.9 for dune-site to work with opam install: https://github.com/ocaml/dune/issues/4212, https://github.com/ocaml/dune/pull/4645, https://github.com/ocaml/dune/pull/4774 (using dune_site 0.1) (name goblint) ; build failed with: Files src/.maingoblint.eobjs/native/mutex.cmx and _opam/lib/ocaml/threads/threads.cmxa both define a module named Mutex diff --git a/goblint.opam b/goblint.opam index e67cc6a6f9..b0a40510ab 100644 --- a/goblint.opam +++ b/goblint.opam @@ -20,7 +20,7 @@ doc: "https://goblint.readthedocs.io/en/latest/" bug-reports: "https://github.com/goblint/analyzer/issues" depends: [ "ocaml" {>= "4.09"} - "dune" {>= "2.8"} + "dune" {>= "2.9"} "goblint-cil" {>= "1.8.2"} "batteries" {>= "3.2.0"} "zarith" {>= "1.8"} @@ -39,7 +39,7 @@ depends: [ ] depopts: ["apron" "z3"] build: [ - ["dune" "subst"] {dev} + ["dune" "subst" "--root" "."] {dev} [ "dune" "build" @@ -47,10 +47,13 @@ build: [ name "-j" jobs + "--promote-install-files" + "false" "@install" "@runtest" {with-test} "@doc" {with-doc} ] + ["dune" "install" "-p" name "--create-install-files" name] ] dev-repo: "git+https://github.com/goblint/analyzer.git" # on `dune build` goblint.opam will be generated from goblint.opam.template and dune-project From 05b920df45baa76b08d864886e0e632039521f5b Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 29 Nov 2021 10:48:00 +0200 Subject: [PATCH 2/3] Move dune version comment to separate line to make dune-release check happy --- dune-project | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dune-project b/dune-project index 9f10591bef..9db84c2b08 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,5 @@ -(lang dune 2.9); need 2.9 for dune-site to work with opam install: https://github.com/ocaml/dune/issues/4212, https://github.com/ocaml/dune/pull/4645, https://github.com/ocaml/dune/pull/4774 +(lang dune 2.9) +; need 2.9 for dune-site to work with opam install: https://github.com/ocaml/dune/issues/4212, https://github.com/ocaml/dune/pull/4645, https://github.com/ocaml/dune/pull/4774 (using dune_site 0.1) (name goblint) ; build failed with: Files src/.maingoblint.eobjs/native/mutex.cmx and _opam/lib/ocaml/threads/threads.cmxa both define a module named Mutex From 5b9fb9e4b456d97e961f6603a01a05eef9bb9565 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 29 Nov 2021 11:17:36 +0200 Subject: [PATCH 3/3] Fix dune subst in opam file generation by requiring dune 2.9.1 --- CHANGELOG.md | 2 +- dune-project | 2 +- goblint.opam | 7 +++---- goblint.opam.locked | 24 +++++++++++++----------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27381fad80..ca3c2b42d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ * Added lower bounds to dependencies (zarith, ocaml-monadic, sha, conf-gmp). * Fixed ounit2 library for unit tests. * Disabled kernel regression tests when linux-headers couldn't be downloaded (e.g. in opam-repository opam-ci). -* Fixed dune-site in opam install by requiring dune 2.9. +* Fixed dune-site in opam install by requiring dune 2.9.1. ## v1.1.0 diff --git a/dune-project b/dune-project index 9db84c2b08..71f5ed0801 100644 --- a/dune-project +++ b/dune-project @@ -24,7 +24,7 @@ (synopsis "Static analysis framework for C") (depends (ocaml (>= 4.09)) - dune + (dune (>= 2.9.1)) ; explicit lower bound needed for opam install (https://github.com/ocaml/dune/pull/4806), (lang dune 2.9.1) doesn't do this (goblint-cil (>= 1.8.2)) ; TODO no way to define as pin-depends? Used goblint.opam.template to add it for now. https://github.com/ocaml/dune/issues/3231. Alternatively, removing this line and adding cil as a git submodule and `(vendored_dirs cil)` as ./dune also works. This way, no more need to reinstall the pinned cil opam package on changes. However, then cil is cleaned and has to be rebuild together with goblint. (batteries (>= 3.2.0)) (zarith (>= 1.8)) diff --git a/goblint.opam b/goblint.opam index b0a40510ab..6c01040eec 100644 --- a/goblint.opam +++ b/goblint.opam @@ -20,7 +20,7 @@ doc: "https://goblint.readthedocs.io/en/latest/" bug-reports: "https://github.com/goblint/analyzer/issues" depends: [ "ocaml" {>= "4.09"} - "dune" {>= "2.9"} + "dune" {>= "2.9.1"} "goblint-cil" {>= "1.8.2"} "batteries" {>= "3.2.0"} "zarith" {>= "1.8"} @@ -39,7 +39,7 @@ depends: [ ] depopts: ["apron" "z3"] build: [ - ["dune" "subst" "--root" "."] {dev} + ["dune" "subst"] {dev} [ "dune" "build" @@ -47,8 +47,7 @@ build: [ name "-j" jobs - "--promote-install-files" - "false" + "--promote-install-files=false" "@install" "@runtest" {with-test} "@doc" {with-doc} diff --git a/goblint.opam.locked b/goblint.opam.locked index fa1d1ec67c..1e201a0de3 100644 --- a/goblint.opam.locked +++ b/goblint.opam.locked @@ -34,7 +34,7 @@ depends: [ "conf-perl" {= "1"} "conf-ruby" {= "1.0.0" & with-test} "cppo" {= "1.6.7"} - "dune" {= "2.9.0"} + "dune" {= "2.9.1"} "dune-private-libs" {= "2.9.1"} "dune-site" {= "2.9.1"} "easy-format" {= "1.3.2"} @@ -74,16 +74,18 @@ depends: [ build: [ ["dune" "subst"] {dev} [ - "dune" - "build" - "-p" - name - "-j" - jobs - "@install" - "@runtest" {with-test} - "@doc" {with-doc} - ] + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} +] + ["dune" "install" "-p" name "--create-install-files" name] ] dev-repo: "git+https://github.com/goblint/analyzer.git" name: "goblint"