Fixes for +options packages for 4.13+ #26033
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 hados != "win32"
and was missing the& arch != "x86_64"
). This meant that on non-Windows and non-x84 hardware, the +options required bothocaml-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.