From d764aad9c202a99088fbdf1299dbd6a84190b5f2 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Wed, 16 Aug 2023 10:25:09 +0300 Subject: [PATCH 1/5] Upgrade to OCaml 5.0 --- goblint.opam | 2 -- goblint.opam.locked | 18 ++++++++---------- goblint.opam.template | 2 -- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/goblint.opam b/goblint.opam index 678ad53d13..ace5be8e3e 100644 --- a/goblint.opam +++ b/goblint.opam @@ -78,6 +78,4 @@ pin-depends: [ [ "goblint-cil.2.0.1" "git+https://github.com/goblint/cil.git#4df989fe625d91ce07d94afe1d85b3b5c6cdd63e" ] # TODO: add back after release, only pinned for optimization (https://github.com/ocaml-ppx/ppx_deriving/pull/252) [ "ppx_deriving.5.2.1" "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6" ] - # TODO: add back after release, only pinned for CI stability - [ "apron.v0.9.13" "git+https://github.com/antoinemine/apron.git#1a8e91062c0d7d1e80333d19d5a432332bbbaec8"] ] diff --git a/goblint.opam.locked b/goblint.opam.locked index acb49a7b14..150e3de42c 100644 --- a/goblint.opam.locked +++ b/goblint.opam.locked @@ -21,11 +21,13 @@ doc: "https://goblint.readthedocs.io/en/latest/" bug-reports: "https://github.com/goblint/analyzer/issues" depends: [ "angstrom" {= "0.15.0"} - "apron" {= "v0.9.13"} + "apron" {= "v0.9.14~beta.2"} "arg-complete" {= "0.1.0"} "astring" {= "0.8.5"} "base-bigarray" {= "base"} "base-bytes" {= "base"} + "base-domains" {= "base"} + "base-nnp" {= "base"} "base-threads" {= "base"} "base-unix" {= "base"} "batteries" {= "3.6.0"} @@ -56,22 +58,22 @@ depends: [ "dune-private-libs" {= "3.6.1"} "dune-site" {= "3.6.1"} "dyn" {= "3.6.1"} + "fileutils" {= "0.6.4"} "fmt" {= "0.9.0"} "fpath" {= "0.7.3"} "goblint-cil" {= "2.0.1"} "integers" {= "0.7.0"} "json-data-encoding" {= "0.12.1"} "jsonrpc" {= "1.15.0~5.0preview1"} - "fileutils" {= "0.6.4"} "logs" {= "0.7.0"} - "mlgmpidl" {= "1.2.14"} + "mlgmpidl" {= "1.2.15"} "num" {= "1.4"} - "ocaml" {= "4.14.0"} - "ocaml-variants" {= "4.14.0+options"} + "ocaml" {= "5.0.0"} "ocaml-compiler-libs" {= "v0.12.4"} - "ocaml-config" {= "2"} + "ocaml-config" {= "3"} "ocaml-option-flambda" {= "1"} "ocaml-syntax-shims" {= "1.0.0"} + "ocaml-variants" {= "5.0.0+options"} "ocamlbuild" {= "0.14.2"} "ocamlfind" {= "1.9.5"} "odoc" {= "2.2.0" & with-doc} @@ -131,10 +133,6 @@ pin-depends: [ "goblint-cil.2.0.1" "git+https://github.com/goblint/cil.git#4df989fe625d91ce07d94afe1d85b3b5c6cdd63e" ] - [ - "apron.v0.9.13" - "git+https://github.com/antoinemine/apron.git#1a8e91062c0d7d1e80333d19d5a432332bbbaec8" - ] [ "ppx_deriving.5.2.1" "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6" diff --git a/goblint.opam.template b/goblint.opam.template index b7f5a7abff..090be92eb9 100644 --- a/goblint.opam.template +++ b/goblint.opam.template @@ -5,6 +5,4 @@ pin-depends: [ [ "goblint-cil.2.0.1" "git+https://github.com/goblint/cil.git#4df989fe625d91ce07d94afe1d85b3b5c6cdd63e" ] # TODO: add back after release, only pinned for optimization (https://github.com/ocaml-ppx/ppx_deriving/pull/252) [ "ppx_deriving.5.2.1" "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6" ] - # TODO: add back after release, only pinned for CI stability - [ "apron.v0.9.13" "git+https://github.com/antoinemine/apron.git#1a8e91062c0d7d1e80333d19d5a432332bbbaec8"] ] From d13e1ac4284600f279b60bd590351f7776fd5b99 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Wed, 16 Aug 2023 11:21:24 +0300 Subject: [PATCH 2/5] Update Gobview to OCaml 5.0 --- gobview | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobview b/gobview index c3dcfaba97..627e25669e 160000 --- a/gobview +++ b/gobview @@ -1 +1 @@ -Subproject commit c3dcfaba97a1df72f027e5dad317e2c201ce5e4b +Subproject commit 627e25669e4cc395e5813ac585e2672c550ca66f From 9146e4fe916246a09e32f1943bd6365fafa01c61 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Wed, 16 Aug 2023 11:21:44 +0300 Subject: [PATCH 3/5] Make OCaml 5.0 default everywhere --- .github/workflows/coverage.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/indentation.yml | 2 +- .github/workflows/locked.yml | 6 +++--- .github/workflows/unlocked.yml | 13 +++++++------ docs/developer-guide/releasing.md | 4 ++-- make.sh | 2 +- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 7472cbc820..74519f3e7c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -18,7 +18,7 @@ jobs: os: - ubuntu-latest ocaml-compiler: - - ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file + - ocaml-variants.5.0.0+options,ocaml-option-flambda # matches opam lock file # don't add any other because they won't be used runs-on: ${{ matrix.os }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cd0414d6fe..522bf9f4c5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,7 +23,7 @@ jobs: os: - ubuntu-latest ocaml-compiler: - - ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file + - ocaml-variants.5.0.0+options,ocaml-option-flambda # matches opam lock file # don't add any other because they won't be used runs-on: ${{ matrix.os }} diff --git a/.github/workflows/indentation.yml b/.github/workflows/indentation.yml index 14db288d60..901766a79f 100644 --- a/.github/workflows/indentation.yml +++ b/.github/workflows/indentation.yml @@ -12,7 +12,7 @@ jobs: os: - ubuntu-latest ocaml-compiler: - - 4.14.x + - 5.0.x runs-on: ${{ matrix.os }} diff --git a/.github/workflows/locked.yml b/.github/workflows/locked.yml index 358682a2f3..70256fd440 100644 --- a/.github/workflows/locked.yml +++ b/.github/workflows/locked.yml @@ -20,7 +20,7 @@ jobs: - ubuntu-latest - macos-latest ocaml-compiler: - - ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file + - ocaml-variants.5.0.0+options,ocaml-option-flambda # matches opam lock file # don't add any other because they won't be used runs-on: ${{ matrix.os }} @@ -94,7 +94,7 @@ jobs: os: - ubuntu-latest ocaml-compiler: - - ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file + - ocaml-variants.5.0.0+options,ocaml-option-flambda # matches opam lock file # don't add any other because they won't be used runs-on: ${{ matrix.os }} @@ -132,7 +132,7 @@ jobs: os: - ubuntu-latest ocaml-compiler: - - ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file + - ocaml-variants.5.0.0+options,ocaml-option-flambda # matches opam lock file # don't add any other because they won't be used node-version: - 14 diff --git a/.github/workflows/unlocked.yml b/.github/workflows/unlocked.yml index 2bec6b72fb..aa9c2b2de3 100644 --- a/.github/workflows/unlocked.yml +++ b/.github/workflows/unlocked.yml @@ -18,7 +18,8 @@ jobs: - ubuntu-latest - macos-latest ocaml-compiler: - - ocaml-variants.4.14.0+options,ocaml-option-flambda + - ocaml-variants.5.0.0+options,ocaml-option-flambda + - 5.0.x - 4.14.x - 4.13.x - 4.12.x @@ -31,10 +32,10 @@ jobs: include: - os: ubuntu-latest - ocaml-compiler: 4.14.x + ocaml-compiler: 5.0.x z3: true - os: ubuntu-latest - ocaml-compiler: 5.0.0 + ocaml-compiler: 5.0.x apron: false # customize name to use readable string for apron instead of just a boolean @@ -120,7 +121,7 @@ jobs: - ubuntu-latest - macos-latest ocaml-compiler: - - ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file, downgrade deps step + - ocaml-variants.5.0.0+options,ocaml-option-flambda # matches opam lock file, downgrade deps step name: lower-bounds (${{ matrix.os }}, ${{ matrix.ocaml-compiler }}, downgrade) @@ -155,7 +156,7 @@ jobs: - name: Downgrade dependencies # must specify ocaml-base-compiler again to prevent it from being downgraded - run: opam install $(opam exec -- opam-0install --prefer-oldest goblint ocaml-variants.4.14.0+options ocaml-option-flambda) + run: opam install $(opam exec -- opam-0install --prefer-oldest goblint ocaml-variants.5.0.0+options ocaml-option-flambda) - name: Build run: ./make.sh nat @@ -240,7 +241,7 @@ jobs: - ubuntu-latest - macos-latest ocaml-compiler: - - ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file + - ocaml-variants.5.0.0+options,ocaml-option-flambda # matches opam lock file runs-on: ${{ matrix.os }} diff --git a/docs/developer-guide/releasing.md b/docs/developer-guide/releasing.md index f6bfbb459e..38612af8f0 100644 --- a/docs/developer-guide/releasing.md +++ b/docs/developer-guide/releasing.md @@ -33,9 +33,9 @@ 11. Check created _distribution archive_ (in `_build`) in a clean environment: - 1. Pull Docker image: `docker pull ocaml/opam:ubuntu-22.04-ocaml-4.14` (or newer). + 1. Pull Docker image: `docker pull ocaml/opam:ubuntu-22.04-ocaml-5.0` (or newer). 2. Extract distribution archive. - 3. Run Docker container in extracted directory: `docker run -it --rm -v $(pwd):/goblint ocaml/opam:ubuntu-22.04-ocaml-4.14` (or newer). + 3. Run Docker container in extracted directory: `docker run -it --rm -v $(pwd):/goblint ocaml/opam:ubuntu-22.04-ocaml-5.0` (or newer). 4. Navigate to distribution archive inside Docker container: `cd /goblint`. 5. Pin package from distribution archive: `opam pin add --no-action .`. 6. Install depexts: `opam depext --with-test goblint`. diff --git a/make.sh b/make.sh index 788289c5ed..e831732bea 100755 --- a/make.sh +++ b/make.sh @@ -8,7 +8,7 @@ opam_setup() { set -x opam init -y -a --bare $SANDBOXING # sandboxing is disabled in travis and docker opam update - opam switch -y create . --deps-only ocaml-variants.4.14.0+options ocaml-option-flambda --locked + opam switch -y create . --deps-only ocaml-variants.5.0.0+options ocaml-option-flambda --locked } rule() { From 2f2766644d09e1645d6be2b53672af8c92174f57 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 21 Aug 2023 17:49:48 +0300 Subject: [PATCH 4/5] Use opam 2.0 compatible switch create (closes #1133) --- make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make.sh b/make.sh index e831732bea..690231088b 100755 --- a/make.sh +++ b/make.sh @@ -8,7 +8,7 @@ opam_setup() { set -x opam init -y -a --bare $SANDBOXING # sandboxing is disabled in travis and docker opam update - opam switch -y create . --deps-only ocaml-variants.5.0.0+options ocaml-option-flambda --locked + opam switch -y create . --deps-only --packages=ocaml-variants.5.0.0+options,ocaml-option-flambda --locked } rule() { From 2213e5dd376c3fcb8dee58e9c63958143f8423ce Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 11 Sep 2023 15:11:06 +0300 Subject: [PATCH 5/5] Update Gobview to fix JS stubs on OCaml 5 --- gobview | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobview b/gobview index 627e25669e..415ee59f16 160000 --- a/gobview +++ b/gobview @@ -1 +1 @@ -Subproject commit 627e25669e4cc395e5813ac585e2672c550ca66f +Subproject commit 415ee59f1671d0c35c623d04cfdbd2f6a14c1568