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

Fixes for +options packages for 4.13+ #26033

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Jun 6, 2024

Two fixes following the report by @MSoegtropIMC in #25861 (comment) that macOS arm hardware was broken when using ocaml-option-flambda and also a fix for ocaml-ci also with flambda reported by @polytypic.

The macOS issue is unfortunate mistake in the conjunction which handles ocaml-option-32bit which had os != "win32" and was missing the & arch != "x86_64"). This meant that on non-Windows and non-x84 hardware, the +options required both ocaml-option-32bit to be installed (which is impossible) and even if they had, it would have tried to install two host-arch- packages, which is also impossible.

The ocaml-ci issue is down to the different solver it uses. opam's solver (including when using 0install) seeks to minimise the number of package installations, which means that "host-arch-x86_32" "ocaml-option-32bit" never looks as good to opam as "host-arch-x86_64". The 0install solver explores the disjunction differently, and is content with either, as they both result in latest versions of packages being installed. It's content with the first one it encounters, so my workaround here is simply to flip the disjunction and have the x86_64 case first. The future work mentioned in #25861 seeks to make these option packages more explicit which should provide a more robust solution for this in future.

dra27 added 2 commits June 6, 2024 11:27
This helps the ocaml-ci solver, which explores disjunctions from left to
right. The main solvers use a different weighting and by default will
minimise the number of installs, which means that they will never prefer
to install an additional package.
@dra27 dra27 merged commit 940717b into ocaml:master Jun 6, 2024
1 check was pending
@dra27 dra27 deleted the gah-disjunctions branch June 6, 2024 15:52
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.

None yet

1 participant