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

Opam-free version check in Dynarray test #504

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Conversation

jmid
Copy link
Collaborator

@jmid jmid commented Jan 6, 2025

Fixes #503

By using ocaml-config:version from ocamlc -config instead of ocaml_version we should be able to get around having to generate a dune stanza... 🤞

(Note: only the first commit should be merged)

@jmid
Copy link
Collaborator Author

jmid commented Jan 6, 2025

Well, that didn't work as dune still invokes ocamlopt on the modules on 5.0 and 5.1, e.g.:
https://github.com/ocaml-multicore/multicoretests/actions/runs/12631250102/job/35192635111?pr=504

(cd _build/default && /home/runner/local/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -I src/dynarray/.stm_tests.eobjs/byte -I src/dynarray/.stm_tests.eobjs/native -I /home/runner/local/lib/ocaml/unix -I lib/.STM.objs/byte -I lib/.STM.objs/native -I lib/.STM_domain.objs/byte -I lib/.STM_domain.objs/native -I lib/.STM_sequential.objs/byte -I lib/.STM_sequential.objs/native -I lib/.util.objs/byte -I lib/.util.objs/native -I qcheck/src/core/.qcheck_core.objs/byte -I qcheck/src/core/.qcheck_core.objs/native -I qcheck/src/runner/.qcheck_runner.objs/byte -I qcheck/src/runner/.qcheck_runner.objs/native -intf-suffix .ml -no-alias-deps -opaque -o src/dynarray/.stm_tests.eobjs/native/dune__exe__Stm_tests.cmx -c -impl src/dynarray/stm_tests.ml)
File "src/dynarray/stm_tests.ml", line 27, characters 18-28:
27 |   type sut = elem Dynarray.t list ref
                       ^^^^^^^^^^
Error: Unbound module Dynarray
Hint: Did you mean Bigarray?

65ecc42 thus attempts generating the dune rules dynamically.

@jmid
Copy link
Collaborator Author

jmid commented Jan 6, 2025

Progress: Now it only scans stm_tests.ml and fails because of the missing QCheck dependency:
https://github.com/ocaml-multicore/multicoretests/actions/runs/12631841584/job/35194341447?pr=504

Run bash multicoretests/.github/runner.sh build
(cd _build/default && /home/runner/local/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -I src/dynarray/.stm_tests.eobjs/byte -I src/dynarray/.stm_tests.eobjs/native -intf-suffix .ml -no-alias-deps -opaque -open Dune__exe -o src/dynarray/.stm_tests.eobjs/native/dune__exe__Stm_tests.cmx -c -impl src/dynarray/stm_tests.ml)
File "src/dynarray/stm_tests.ml", line 1, characters 5-11:
1 | open QCheck
         ^^^^^^
Error: Unbound module QCheck
Error: Process completed with exit code 1.

53b5af6 thus switches to a generic (rule ...) without any .ml code dependencies.

@jmid jmid force-pushed the opam-less-version-check branch from 53b5af6 to 497ea77 Compare January 6, 2025 12:19
@jmid
Copy link
Collaborator Author

jmid commented Jan 6, 2025

The opam 4.12 installation workflow is failing - as ocaml_release was added in 4.14:
https://github.com/ocaml-multicore/multicoretests/actions/runs/12632373008/job/35195929875?pr=504

#=== ERROR while compiling qcheck-multicoretests-util.dev =====================#
# context     2.1.6 | linux/x86_64 | ocaml-base-compiler.4.12.1 | pinned(git+file:///home/runner/work/multicoretests/multicoretests#HEAD#e9d16510625d375f1d181f7da998477ce45ec082)
# path        ~/work/multicoretests/multicoretests/_opam/.opam-switch/build/qcheck-multicoretests-util.dev
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p qcheck-multicoretests-util -j 4 @install @runtest
# exit-code   1
# env-file    ~/.opam/log/qcheck-multicoretests-util-2346-6fc7e4.env
# output-file ~/.opam/log/qcheck-multicoretests-util-2346-6fc7e4.out
### output ###
# (cd src/dynarray && /home/runner/work/multicoretests/multicoretests/_opam/bin/ocaml -I +compiler-libs /home/runner/work/multicoretests/multicoretests/_opam/.opam-switch/build/qcheck-multicoretests-util.dev/_build/.dune/default/src/dynarray/dune.ml)
# File "src/dynarray/dune", line 6, characters 23-36:
# Error: Unbound value ocaml_release

d89d51a thus uses and parses Sys.ocaml_version instead... 🤞

@jmid
Copy link
Collaborator Author

jmid commented Jan 6, 2025

CI summary: All 33 workflows passed. Merging.

@jmid jmid merged commit c9fc4da into main Jan 6, 2025
33 checks passed
@jmid jmid deleted the opam-less-version-check branch January 6, 2025 17:02
@jmid
Copy link
Collaborator Author

jmid commented Jan 7, 2025

CI summary for merge to main: All trunk workflows except MinGW bytecode trunk timed out #505

  • 32bit trunk timed out after 240m in STM Sys test parallel
  • Bytecode trunk timed out after 240m in STM Sys stress test parallel
  • Cygwin trunk timed out after 240m in STM Sys stress test parallel
  • FP trunk timed out after 240m in STM Sys stress test parallel
  • Linux trunk timed out after 180m in STM Sys test parallel
  • Linux trunk debug timed out after 240m in STM Sys test parallel
  • MSVC bytecode trunk timed out after 240m in STM Sys stress test parallel
  • MSVC trunk timed out after 180m in STM Sys test parallel
  • MinGW trunk timed out after 240m in STM Sys stress test parallel
  • macOS-ARM64 trunk timed out after 180m in STM Sys stress test parallel
  • macOS-intel trunk timed out after 180m in STM Sys stress test parallel
  • musl trunk timed out after 240m in STM Out_channel test parallel

Out of 34 workflows 12 timed out - with what appears to be a genuine regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynarray test PR broke scheduled 5.0 and 5.1 workflows
1 participant