Skip to content

chore(CI): add CI jobs for package dependency specification and lower bounds#13844

Merged
shonfeder merged 4 commits intoocaml:mainfrom
Sudha247:ci-isolated-package-builds
Mar 25, 2026
Merged

chore(CI): add CI jobs for package dependency specification and lower bounds#13844
shonfeder merged 4 commits intoocaml:mainfrom
Sudha247:ci-isolated-package-builds

Conversation

@Sudha247
Copy link
Collaborator

Fixes #13731.

This is to catch any packaging errors early. This tries to replicate the opam-repo-ci job, which does this (one instance here: https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/a95df9014bc79103fde668cf2adbe6680fd2f9cf/variant/compilers,5.0,fs-io.3.21.0~alpha3,tests), but within source.

The opam-repo-ci job clones the whole opam-repository and adds the PR as its overlay and tries to install a particular package. We do something similar here by installing dependencies of a specific package and building only that package. I tried to do it without pinning other packages within Dune, but that proved to be tricky; Most packages in the dev repo require the development version of Dune and sibling packages (where there are dependencies on sibling packages). So, I resorted to only pinning the packages and not installing them, thus making them available to the solver, but the packages themselves don't influence the solver.

Note: This matrix creates an independent job for every package. I haven't yet figured out how to make it less noisy in GitHub Actions.

@Sudha247 Sudha247 requested a review from shonfeder March 19, 2026 15:31
@Sudha247
Copy link
Collaborator Author

There's a failing job for dune.opam

/home/runner/work/dune/dune/_opam/bin:/opt/hostedtoolcache/opam/2.5.0/x86_64:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
File "bin/dune", line 48, characters 2-4:
48 |   re)
       ^^
Error: Library "re" not found.
-> required by _build/default/bin/main.exe
-> required by _build/install/default/bin/dune
-> required by _build/default/dune.install
-> required by alias install

I suspect because dune.opam doesn't specify this as dependency.

@Sudha247 Sudha247 force-pushed the ci-isolated-package-builds branch 2 times, most recently from b509cac to 8013372 Compare March 20, 2026 10:36
@Sudha247 Sudha247 requested a review from shonfeder March 20, 2026 10:55
@Sudha247 Sudha247 changed the title CI jobs for package dependency specification chore(CI): add CI jobs for package dependency specification and lower bounds Mar 20, 2026
Copy link
Member

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

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

Looking good! I'm very happy to see the actions passing :D Have you been able to test that it can identify packaging errors? (E.g., perhaps by reversing the csexp lower bound added in https://github.com/ocaml/dune/pull/13730/changes ?)

@Sudha247 Sudha247 force-pushed the ci-isolated-package-builds branch 3 times, most recently from 87e9135 to 3416857 Compare March 23, 2026 10:44
@Sudha247
Copy link
Collaborator Author

Here's reversing #13730 in a test branch and it reproduces the lower bounds failure: https://github.com/Sudha247/dune/actions/runs/23433560103/job/68165835580?pr=3

@Sudha247
Copy link
Collaborator Author

I'm not sure the Windows CI failure is related - this PR is not touching any related code.

@Sudha247 Sudha247 requested a review from shonfeder March 23, 2026 11:40
Copy link
Member

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

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

LGTM!

We can use this on the pending patch release. Thanks! :)

Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
…ds check

Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Minor typo fixes and use the previously computed packages list for pinning packages. Mark the package versions as dev

Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Run the workflow only on merges to the main branch and provide an option for
manually running it with workflow dispatch.

Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
@Sudha247 Sudha247 force-pushed the ci-isolated-package-builds branch from 3416857 to 6a4a9eb Compare March 25, 2026 09:57
@shonfeder shonfeder merged commit 601be4d into ocaml:main Mar 25, 2026
29 checks passed
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.

Test package dependency specificiation in CI

3 participants