OCaml 5.0.0 - First release candidate

The release of OCaml version 5.0.0 is imminent. As a final step before the release, we are publishing a release candidate that you can test while waiting for the release in the upcoming weeks.

If you find any bugs, please report them on OCaml's issue tracker.

Compared to the second beta release, this release contains one toplevel bug fix and a minor type system fix.

If you are interested by the bug fixes beyond the new Multicore runtime, the full change log for OCaml 5.0.0 is available on GitHub

A short summary of the changes since the second beta release is also available below.


Installation Instructions

The base compiler can be installed as an opam switch with the following commands on opam 2.1:

opam update
opam switch create 5.0.0~rc1

For previous version of opam, the switch creation command line is slightly more verbose:

opam update
opam switch create 5.0.0~rc1 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git

It might be also interesting to check the new support for parallelism by installing the domainslib library with

opam install domainslib

The source code for the release candidate is also directly available on:

Fine-Tuned Compiler Configuration

If you want to tweak the configuration of the compiler, you can switch to the option variant with:

opam update
opam switch create <switch_name> ocaml-variants.5.0.0~rc1+options <option_list>

where <option_list> is a comma-separated list of ocaml-option-* packages. For instance, for a flambda and no-flat-float-array switch:

opam switch create 5.0.0~rc1+flambda+nffa ocaml-variants.5.0.0~rc1+options ocaml-option-flambda ocaml-option-no-flat-float-array

The command line above is slightly more complicated for opam versions before 2.1:

opam update
opam switch create <switch_name> --packages=ocaml-variants.5.0.0~rc1+options,<option_list> --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git

In both cases, all available options can be listed with opam search ocaml-option.

See full changelog

Changes Since the Second Beta Release

Bug Fixes

  • #11776: Extend environment with functor parameters in strengthen_lazy. (Chris Casinghino and Luke Maurer, review by Gabriel Scherer)

  • #11533, #11534: follow synonyms again in #show_module_type (this had stopped working in 4.14.0) (Gabriel Scherer, review by Jacques Garrigue, report by Yaron Minsky)