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.
This PR adds ocaml-base-compiler.5.3.0~alpha1 and ocaml-variants.5.3.0~alpha1+options.
As a trial for this release cycle, in a similar vein to #17541, there is a small tweak to the compiler's packaging, intended to reduce the maintenance burden in future. The change should be almost completely transparent to users - please either install
ocaml.5.3.0
,ocaml-base-compiler.5.3.0~alpha1
, orocaml-variants.5.3.0~alpha1+options
as you would have done before.The restructuring introduces a new package ocaml-compiler.5.3.0~alpha1. The intention of this package is similar to ocaml-config, in that it carries the source tarball, dependencies and build instructions for the compiler. This package becomes a single source of truth for a given release of the compiler and means that when changes such as #16722, #19855 and #26177 come along in future only one package per release has to be updated. It also reduces the number of packages to which configuration improvements need to be added such as in #26323.
In terms of review, if one compares the current packages/ocaml-variants/ocaml-variants.5.3.0+trunk/opam with packages/ocaml-compiler/ocaml-compiler.5.3.0~alpha1/opam, the only pertinent difference is that the new ocaml-compiler packages do not have the
conflict-class
field. The new ocaml-base-compiler.5.3.0~alpha1 and ocaml-variants.5.3.0~alpha1 packages then just have to depend on ocaml-compiler.5.3.0~alpha1 and retain theconflict-class
field. Note that ocaml-base-compiler.5.3.0~alpha1 still depends on ocaml-options-vanilla. That package conflicts all the ocaml-option-* packages, and so all the:installed
tests being false reduces the myriad options passed toconfigure
to be equivalent to those passed in ocaml-base-compiler.5.2.0 with one exception.ASPP=cc -c
is no longer passed toconfigure
for OpenBSD and macOS, however the default in OCaml'sconfigure
has already catered for this since OCaml 4.08 (so there is no semantic difference).The ocaml-variants.5.3.0+trunk package is updated to use ocaml-compiler.5.3. This version ("5.3") of ocaml-compiler is "cunningly" picked as it is older than release versions, which avoids any temptation of opam to try to upgrade to it. It's necessary to use the structure for ocaml-variants.5.3.0+trunk now as, uniquely, during a release cycle we have avoid-version set on the alpha releases which otherwise makes ocaml-variants.5.3.0+trunk more tempting to the solver, because it involves one package installation fewer.
I have tested this packaging locally on Linux and Windows (mingw-w64 and msvc64) with
opam switch create ocaml-5.3 --formula '"ocaml" {>= "5.3" & < "5.4"}'
and verified that in each case ocaml-base-compiler.5.3.0~alpha1 is the default selected package.Finally, there is a minor tweak to ocaml.5.3.0 to allow the use of pre-release ocaml-base-compiler packages and in the environment commands the beginnings of a fix for #25819 (on which more soon).