Skip to content

Fix the CI of the Eio packages - #2

Open
balat wants to merge 5 commits into
lyrm:eiofrom
balat:eio-fixes
Open

balat wants to merge 5 commits into
lyrm:eiofrom
balat:eio-fixes

Conversation

@balat

@balat balat commented Oct 9, 2026

Copy link
Copy Markdown

Hi! Thanks a lot for this work, Irmin 4 would like to use qcheck-stm-eio.

The CI of ocaml-multicore#581 is red, so I tried to fix it. There are two causes, and a few small things:

  • Eio neg_tests built everywhere. The default alias builds every test in src/neg_tests. The CI jobs that build the compiler from source do not install Eio, so they fail with Library "eio_main" not found. The Eio tests now use (build_if %{lib-available:eio_main}), so the main test suite still does not depend on Eio.
  • Helper libraries attached to multicoretests. The Eio tests use stm_tests_ref_spec, CList, lin_tests_common and lin_internal_tests_common, which were in package multicoretests. With dune build -p qcheck-stm-eio @runtest (what opam install --with-test runs), they could not be found. I removed their (package) field. This bug was hidden by the next one.
  • eio_main missing from the test dependencies of qcheck-stm-eio and qcheck-lin-eio. This is why the opam job on 5.2.0 failed.
  • The Eio packages now require OCaml 5.1, like Eio itself.
  • The Eio step of the opam workflow had no name.

What I checked locally:

  • OCaml 5.4 without Eio, QCheck v0.90 vendored like in CI: dune build and dune build test/ succeed. Without the first commit, I get the 4 eio_main errors from CI.
  • OCaml 5.4 with Eio 1.6: dune build -p qcheck-multicoretests-util,qcheck-stm,qcheck-lin,qcheck-stm-eio,qcheck-lin-eio @install @runtest succeeds, and the Eio neg_tests find their counterexamples as expected.

The trunk jobs also fail on main, so I think they are unrelated.

Each commit does one thing, so feel free to pick only some of them. I also have the same commits on top of the current main (your branch is 11 commits behind), if that helps. Does this look right to you?

balat added 5 commits October 9, 2026 16:40
The default alias builds every test in src/neg_tests. The CI jobs that
build the compiler from source do not install Eio, so they failed with
'Library "eio_main" not found'. Using build_if keeps Eio out of the
dependency cone of the main test suite.
The Eio neg_tests belong to qcheck-stm-eio and qcheck-lin-eio, but they
use stm_tests_ref_spec, CList, lin_tests_common and
lin_internal_tests_common. These were attached to multicoretests, so
'dune build -p qcheck-stm-eio @runtest' (as run by opam --with-test)
could not find them. Private libraries without a package are available
to the tests of every package.
The Eio neg_tests link with eio_main, so 'opam install --with-test'
failed without it.
Eio itself requires OCaml 5.1, so the 4.12 lower bound was misleading.
@balat

balat commented Oct 9, 2026

Copy link
Copy Markdown
Author

@Julow, these commits build on your neg_tests and CI work from #1. Would you have time to have a look? I want to make sure I did not miss why the helper libraries were attached to multicoretests. Thanks!

@Julow Julow left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks! Can you try removing the build_if ? I'd say that supporting bare dune build isn't interesting if we implicitly don't run some tests.

Comment thread src/neg_tests/dune
(modules lin_tests_eio)
(package qcheck-lin-eio)
; Eio is not a dependency of multicoretests: skip when it is missing
(build_if %{lib-available:eio_main})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Isn't (package qcheck-lin-eio) above enough now that eio_main is a dependency ?

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.

2 participants