Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use 5.1.1 for tests #10763

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,29 @@ jobs:
# We don't run tests on all versions of the Windows environment and on
# 4.02.x and 4.07.x in other environments
ocaml-compiler:
- 4.14.x
- 5.1.x
include:
# OCaml trunk:
- ocaml-compiler: ocaml-variants.5.3.0+trunk
os: ubuntu-latest
skip_test: true
# OCaml 5:
- ocaml-compiler: 5.1.x
# OCaml 4:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a typo? Or should we have a separate 4.14 CI run here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed the plan was to add a 4.14 build-only CI instead of the 4.13 one.

- ocaml-compiler: 4.14.x
os: ubuntu-latest
skip_test: true
- ocaml-compiler: 5.1.x
- ocaml-compiler: 4.14.x
os: macos-latest
skip_test: true
# macOS x86_64 (Intel)
- ocaml-compiler: 4.14.x
- ocaml-compiler: 5.1.x
os: macos-13
skip_test: true
# MSVC
# MSVC (left behind until we upgrade to 5.2.0)
- ocaml-compiler: ocaml-base-compiler.4.14.2,system-msvc
os: windows-latest
# mingw
- ocaml-compiler: ocaml-base-compiler.4.14.2,system-mingw
- ocaml-compiler: ocaml-base-compiler.5.1.1,system-mingw
os: windows-latest
# OCaml 4:
- ocaml-compiler: 4.13.x
os: ubuntu-latest
skip_test: true
- ocaml-compiler: 4.08.x
os: ubuntu-latest
skip_test: true
Expand Down Expand Up @@ -147,7 +143,7 @@ jobs:
fail-fast: false
matrix:
ocaml-compiler:
- 4.14.x
- 5.1.x
steps:
- uses: actions/checkout@v4
- name: Use OCaml ${{ matrix.ocaml-compiler }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DEV_DEPS := \
core_bench \
patdiff

TEST_OCAMLVERSION := 4.14.2
TEST_OCAMLVERSION := 5.1.1

-include Makefile.dev

Expand Down
4 changes: 2 additions & 2 deletions doc/hacking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ Here are the most common commands you'll be running:
$ ./dune.exe build @foo


Note that tests are currently written for version 4.14.2 of the OCaml compiler.
Note that tests are currently written for version 5.1.1 of the OCaml compiler.
Some tests depend on the specific wording of compilation errors which can change
between compiler versions, so to reliably run the tests make sure that
``ocaml.4.14.2`` is installed. The ``TEST_OCAMLVERSION`` in the ``Makefile`` at
``ocaml.5.1.1`` is installed. The ``TEST_OCAMLVERSION`` in the ``Makefile`` at
the root of the Dune repo contains the current compiler version for which tests
are written.

Expand Down
4 changes: 2 additions & 2 deletions dune.opam
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ depends: [
"menhir" { with-dev-setup & os != "win32" }
"ocamlfind" { with-dev-setup & os != "win32" }
"odoc" { with-dev-setup & >= "2.4.0" & os != "win32" }
"ppx_expect" { with-dev-setup & >= "v0.16.0" & os != "win32" }
"ppx_expect" { with-dev-setup & >= "v0.16" & < "v0.17" & os != "win32" }
"ppx_inline_test" { with-dev-setup & os != "win32" }
"ppxlib" { with-dev-setup & os != "win32" }
"ctypes" { with-dev-setup & os != "win32" }
"utop" { with-dev-setup & >= "2.6.0" & os != "win32" }
"melange" { with-dev-setup & >= "4.0.0-414" & os != "win32" }
"melange" { with-dev-setup & >= "4.0.0-51" & os != "win32" }
]
4 changes: 2 additions & 2 deletions dune.opam.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ depends: [
"menhir" { with-dev-setup & os != "win32" }
"ocamlfind" { with-dev-setup & os != "win32" }
"odoc" { with-dev-setup & >= "2.4.0" & os != "win32" }
"ppx_expect" { with-dev-setup & >= "v0.16.0" & os != "win32" }
"ppx_expect" { with-dev-setup & >= "v0.16" & < "v0.17" & os != "win32" }
"ppx_inline_test" { with-dev-setup & os != "win32" }
"ppxlib" { with-dev-setup & os != "win32" }
"ctypes" { with-dev-setup & os != "win32" }
"utop" { with-dev-setup & >= "2.6.0" & os != "win32" }
"melange" { with-dev-setup & >= "4.0.0-414" & os != "win32" }
"melange" { with-dev-setup & >= "4.0.0-51" & os != "win32" }
]
16 changes: 8 additions & 8 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
inputs.flake-utils.follows = "flake-utils";
};
melange = {
url = "github:melange-re/melange/refs/tags/4.0.0-414";
url = "github:melange-re/melange/refs/tags/4.0.0-51";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
Expand All @@ -30,7 +30,7 @@
let
pkgs = nixpkgs.legacyPackages.${system}.appendOverlays [
(self: super: {
ocamlPackages = super.ocaml-ng.ocamlPackages_4_14.overrideScope (oself: osuper: {
ocamlPackages = super.ocaml-ng.ocamlPackages_5_1.overrideScope (oself: osuper: {
mdx = osuper.mdx.override {
logs = oself.logs;
};
Expand All @@ -48,7 +48,7 @@
})
];
dune-static-overlay = self: super: {
ocamlPackages = super.ocaml-ng.ocamlPackages_4_14.overrideScope (oself: osuper: {
ocamlPackages = super.ocaml-ng.ocamlPackages_5_1.overrideScope (oself: osuper: {
dune_3 = osuper.dune_3.overrideAttrs (a: {
src = ./.;
preBuild = "ocaml boot/bootstrap.ml --static";
Expand Down Expand Up @@ -218,7 +218,8 @@
coq =
pkgs.mkShell {
nativeBuildInputs = testNativeBuildInputs;
inputsFrom = [ pkgs.dune_3 ];
# Coq requires OCaml 4.x
inputsFrom = [ pkgs.ocaml-ng.ocamlPackages_4_14.dune_3 ];
buildInputs = with pkgs; [
coq_8_16_native
coq_8_16_native.ocamlPackages.findlib
Expand Down
2 changes: 1 addition & 1 deletion otherlibs/dune-site/test/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Test with an opam like installation
"_build/install/default/lib/a/a__.cmx"
"_build/install/default/lib/a/a__.ml"
"_build/install/default/lib/a/a__Sites.cmi"
"_destdir/_destdir/lib/a/a__Sites.cmt"
"_build/install/default/lib/a/a__Sites.cmt"
"_build/install/default/lib/a/a__Sites.cmx"
"_destdir/_destdir/lib/a/dune-package"
"_build/install/default/lib/a/opam"
Expand Down
2 changes: 1 addition & 1 deletion otherlibs/dune-site/test/run_2_9.t
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Test with an opam like installation
"_build/install/default/lib/a/a__.cmx"
"_build/install/default/lib/a/a__.ml"
"_build/install/default/lib/a/a__Sites.cmi"
"_destdir/_destdir/lib/a/a__Sites.cmt"
"_build/install/default/lib/a/a__Sites.cmt"
rgrinberg marked this conversation as resolved.
Show resolved Hide resolved
"_build/install/default/lib/a/a__Sites.cmx"
"_destdir/_destdir/lib/a/dune-package"
"_build/install/default/lib/a/opam"
Expand Down
16 changes: 8 additions & 8 deletions test/blackbox-tests/test-cases/describe/describe-workspace-pp.t
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,17 @@ not stable across different setups.
(uid c39d8e11db2363236e69af7750ce7b9a)
(local false)
(requires ())
(source_dir /FINDLIB/ocaml/compiler-libs)
(source_dir /FINDLIB/compiler-libs)
(modules ())
(include_dirs (/FINDLIB/ocaml/compiler-libs))))
(include_dirs (/FINDLIB/compiler-libs))))
(library
((name compiler-libs.common)
(uid c9367091ddd9a70d99fc22ede348f17c)
(local false)
(requires (c39d8e11db2363236e69af7750ce7b9a))
(source_dir /FINDLIB/ocaml/compiler-libs)
(source_dir /FINDLIB/compiler-libs)
(modules ())
(include_dirs (/FINDLIB/ocaml/compiler-libs))))
(include_dirs (/FINDLIB/compiler-libs))))
(library
((name dummy_ppx)
(uid f9851d3f8ae32391e7594cf97332a78c)
Expand Down Expand Up @@ -280,17 +280,17 @@ not stable across different setups.
(uid c39d8e11db2363236e69af7750ce7b9a)
(local false)
(requires ())
(source_dir /FINDLIB/ocaml/compiler-libs)
(source_dir /FINDLIB/compiler-libs)
(modules ())
(include_dirs (/FINDLIB/ocaml/compiler-libs))))
(include_dirs (/FINDLIB/compiler-libs))))
(library
((name compiler-libs.common)
(uid c9367091ddd9a70d99fc22ede348f17c)
(local false)
(requires (c39d8e11db2363236e69af7750ce7b9a))
(source_dir /FINDLIB/ocaml/compiler-libs)
(source_dir /FINDLIB/compiler-libs)
(modules ())
(include_dirs (/FINDLIB/ocaml/compiler-libs))))
(include_dirs (/FINDLIB/compiler-libs))))
(library
((name dummy_ppx)
(uid f9851d3f8ae32391e7594cf97332a78c)
Expand Down
16 changes: 8 additions & 8 deletions test/blackbox-tests/test-cases/describe/describe.t
Original file line number Diff line number Diff line change
Expand Up @@ -382,17 +382,17 @@ not stable across different setups.
(uid c39d8e11db2363236e69af7750ce7b9a)
(local false)
(requires ())
(source_dir /FINDLIB/ocaml/compiler-libs)
(source_dir /FINDLIB/compiler-libs)
(modules ())
(include_dirs (/FINDLIB/ocaml/compiler-libs))))
(include_dirs (/FINDLIB/compiler-libs))))
(library
((name compiler-libs.common)
(uid c9367091ddd9a70d99fc22ede348f17c)
(local false)
(requires (c39d8e11db2363236e69af7750ce7b9a))
(source_dir /FINDLIB/ocaml/compiler-libs)
(source_dir /FINDLIB/compiler-libs)
(modules ())
(include_dirs (/FINDLIB/ocaml/compiler-libs))))
(include_dirs (/FINDLIB/compiler-libs))))
(library
((name dummy_ppx)
(uid 8773da23dc506fbda63b4ff411075fb9)
Expand Down Expand Up @@ -922,17 +922,17 @@ not stable across different setups.
(uid c39d8e11db2363236e69af7750ce7b9a)
(local false)
(requires ())
(source_dir /FINDLIB/ocaml/compiler-libs)
(source_dir /FINDLIB/compiler-libs)
(modules ())
(include_dirs (/FINDLIB/ocaml/compiler-libs))))
(include_dirs (/FINDLIB/compiler-libs))))
(library
((name compiler-libs.common)
(uid c9367091ddd9a70d99fc22ede348f17c)
(local false)
(requires (c39d8e11db2363236e69af7750ce7b9a))
(source_dir /FINDLIB/ocaml/compiler-libs)
(source_dir /FINDLIB/compiler-libs)
(modules ())
(include_dirs (/FINDLIB/ocaml/compiler-libs))))
(include_dirs (/FINDLIB/compiler-libs))))
(library
((name dummy_ppx)
(uid 8773da23dc506fbda63b4ff411075fb9)
Expand Down
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/dune-cache/mode-copy.t
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ never built [target1] before.
$ dune build --config-file=config target1 --debug-cache=shared,workspace-local \
> 2>&1 | grep '_build/default/source\|_build/default/target'
Workspace-local cache miss: _build/default/source: never seen this target before
Shared cache miss [14310d25a9f1419e568e561a619c1aba] (_build/default/source): not found in cache
Shared cache miss [8348c01f326067980ad86af892929f3c] (_build/default/source): not found in cache
Workspace-local cache miss: _build/default/target1: never seen this target before
Shared cache miss [859bfe7523c5c00a35ba163f44225971] (_build/default/target1): not found in cache
Shared cache miss [c2123082b4c244db03032a3d0a5bc529] (_build/default/target1): not found in cache

$ dune_cmd stat hardlinks _build/default/source
1
Expand Down
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/dune-cache/mode-hardlink.t
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ never built [target1] before.
$ dune build --config-file=config target1 --debug-cache=shared,workspace-local \
> 2>&1 | grep '_build/default/source\|_build/default/target'
Workspace-local cache miss: _build/default/source: never seen this target before
Shared cache miss [761de13745c580498ceed897e6f7dfa0] (_build/default/source): not found in cache
Shared cache miss [b680278cc381aadce4727f68fb94cbe2] (_build/default/source): not found in cache
Workspace-local cache miss: _build/default/target1: never seen this target before
Shared cache miss [bca67363790f3659e7dbb055563002ce] (_build/default/target1): not found in cache
Shared cache miss [8818eb46b9935b64bb4c63ca38b86d2e] (_build/default/target1): not found in cache

$ dune_cmd stat hardlinks _build/default/source
3
Expand Down
6 changes: 3 additions & 3 deletions test/blackbox-tests/test-cases/dune-cache/repro-check.t
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Set 'cache-check-probability' to 1.0, which should trigger the check
> EOF
$ rm -rf _build
$ dune build --config-file config reproducible non-reproducible
Warning: cache store error [a6a24f394ece470e01ae5a1642dfeaff]: ((in_cache
Warning: cache store error [eb278f352c7ce69cf4ab45956390a62c]: ((in_cache
((non-reproducible 1c8fc4744d4cef1bd2b8f5e915b36be9))) (computed
((non-reproducible 6cfaa7a90747882bcf4ffe7252c1cf89)))) after executing
(echo 'build non-reproducible';cp dep non-reproducible)
Expand Down Expand Up @@ -120,7 +120,7 @@ Test that the environment variable and the command line flag work too

$ rm -rf _build
$ DUNE_CACHE_CHECK_PROBABILITY=1.0 dune build --cache=enabled reproducible non-reproducible
Warning: cache store error [a6a24f394ece470e01ae5a1642dfeaff]: ((in_cache
Warning: cache store error [eb278f352c7ce69cf4ab45956390a62c]: ((in_cache
((non-reproducible 1c8fc4744d4cef1bd2b8f5e915b36be9))) (computed
((non-reproducible 6cfaa7a90747882bcf4ffe7252c1cf89)))) after executing
(echo 'build non-reproducible';cp dep non-reproducible)
Expand All @@ -132,7 +132,7 @@ Test that the environment variable and the command line flag work too

$ rm -rf _build
$ dune build --cache=enabled --cache-check-probability=1.0 reproducible non-reproducible
Warning: cache store error [a6a24f394ece470e01ae5a1642dfeaff]: ((in_cache
Warning: cache store error [eb278f352c7ce69cf4ab45956390a62c]: ((in_cache
((non-reproducible 1c8fc4744d4cef1bd2b8f5e915b36be9))) (computed
((non-reproducible 6cfaa7a90747882bcf4ffe7252c1cf89)))) after executing
(echo 'build non-reproducible';cp dep non-reproducible)
Expand Down
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/dune-cache/trim.t
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ entries uniformly.

$ (cd "$PWD/.xdg-cache/dune/db/meta/v5"; grep -rws . -e 'metadata' | sort ) > out
$ cat out
./1e/1efc41b0afe3809e04a72bc8adc62354:((8:metadata)(5:files(8:target_a32:5637dd9730e430c7477f52d46de3909c)))
./32/328a92f21e553977cbd543f462bcac6c:((8:metadata)(5:files(8:target_b32:8a53bfae3829b48866079fa7f2d97781)))
./9e/9ec477cee96a2159fd639e0c0d70f065:((8:metadata)(5:files(8:target_a32:5637dd9730e430c7477f52d46de3909c)))
./cb/cbd5fd268a285fca51c14f9b818506fb:((8:metadata)(5:files(8:target_b32:8a53bfae3829b48866079fa7f2d97781)))

$ digest="$(awk -F: '/target_b/ { digest=$1 } END { print digest }' < out)"

Expand Down
4 changes: 4 additions & 0 deletions test/blackbox-tests/test-cases/error_messages_separated.t
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ between error messages for different files, as expected.
1 | let f x y z = ()
^
Error (warning 27 [unused-var-strict]): unused variable x.

File "a.ml", line 1, characters 8-9:
1 | let f x y z = ()
^
Error (warning 27 [unused-var-strict]): unused variable y.

File "a.ml", line 1, characters 10-11:
1 | let f x y z = ()
^
Expand All @@ -78,10 +80,12 @@ message either.
1 | let f x y z = ()
^
Error (warning 27 [unused-var-strict]): unused variable x.

File "a.ml", line 1, characters 8-9:
1 | let f x y z = ()
^
Error (warning 27 [unused-var-strict]): unused variable y.

File "a.ml", line 1, characters 10-11:
1 | let f x y z = ()
^
Expand Down
1 change: 0 additions & 1 deletion test/blackbox-tests/test-cases/findlib-dynload.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
Findlib.record_package Findlib.Record_core "findlib.internal";;
Findlib.record_package Findlib.Record_core "mytool";;
Findlib.record_package Findlib.Record_core "threads";;
Findlib.record_package Findlib.Record_core "threads.posix";;
Findlib.record_package Findlib.Record_core "unix";;
let preds =
[ "mt"
Expand Down
3 changes: 3 additions & 0 deletions test/blackbox-tests/test-cases/jsoo/inline-tests.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ Run inline tests using node js
> (lang dune 2.6)
> EOF

(With the dev profile on OCaml 5, the warning is expected)

$ dune runtest
inline tests (Byte)
inline tests (Byte)
Warning: your program contains effect handlers; you should probably run js_of_ocaml with option '--enable=effects'
inline tests (Native)
inline tests (Native)
inline tests (JS)
Expand Down
Loading
Loading