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

Packages for OCaml 5.3.0~alpha1 #26594

Merged
merged 4 commits into from
Sep 20, 2024
Merged

Packages for OCaml 5.3.0~alpha1 #26594

merged 4 commits into from
Sep 20, 2024

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Sep 20, 2024

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, or ocaml-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 the conflict-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 to configure to be equivalent to those passed in ocaml-base-compiler.5.2.0 with one exception. ASPP=cc -c is no longer passed to configure for OpenBSD and macOS, however the default in OCaml's configure 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).

OCAML_TOPLEVEL_PATH is left for now as ocamlfind's stub still uses it.
Solver weights are incorrect otherwise, and ocaml-variants.5.3.0+trunk
becomes preferable to the pre-releases.
@avsm avsm merged commit bb1cb58 into ocaml:master Sep 20, 2024
1 of 2 checks passed
@avsm
Copy link
Member

avsm commented Sep 20, 2024

Thanks!

@dra27 dra27 deleted the ocaml-5.3.0-alpha1 branch September 20, 2024 15:44
@Octachron
Copy link
Member

Thanks for the opam packages! I will send the announce for the alpha release once the opam repository has been updated.

@kit-ty-kate
Copy link
Member

I will send the announce for the alpha release once the opam repository has been updated.

this is now the case

@Octachron
Copy link
Member

Thanks for the ping ! I have sent the announces.

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.

4 participants