Second release candidate for OCaml 5.1.0

In the last two weeks, two significant bugs have been discovered in the release candidate for OCaml 5.1.0 (one affecting the type system, another in the runtime).

Those bugs are now fixed and we are publishing a second release candidate to check that everything is in order before the release in the upcoming week.

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

The full change log for OCaml 5.1.0 is available on GitHub.
A short summary of the two fixed bugs in this release candidate is also available below.

Installation Instructions

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

opam update
opam switch create 5.1.0~rc2

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.1.0~rc2+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.1.0~rc2+flambda+nffa ocaml-variants.5.1.0~rc2+options ocaml-option-flambda ocaml-option-no-flat-float-array

All available options can be listed with opam search ocaml-option.

Last Minute Bug Fixes

Type System:

  • (breaking change) #6941, #11187, +#12483: prohibit using classes through recursive modules
    inheriting or including a class belonging to a mutually-recursive module
    would previous behave incorrectly, and now results in a clean error.
    (Leo White, review by Gabriel Scherer and Florian Angeletti)


  • #12481, #12505: Fix incorrect initialization of array expressions
    [|e1;...;eN|] when N is large enough to require major heap allocation.
    (Xavier Leroy, report by Andrey Popp, analysis by KC Sivaramakrishnan
    and Vincent Laviron, review by Gabriel Scherer)

Tell me if I should open another one thread but what is the current status of windows port of OCaml ? Right now 5.0.0 is still not supported in cygwin/mingw, is there any change with OCaml 5.1 or is the support definitively dropped ?

(As I am not an administrator using cygwin with mingw toolchain is the only way I have to build OCaml code at work)

The mingw64 port has been supported on OCaml 5.0.0 since day 1.

The cygwin port has been restored in 5.1.0 .

The MSVC port is still planned (and will be hopefully easier now that a version of MSVC with C atomics was released few days before the OCaml 5.0.0 release).

1 Like

@octachron has already replied, but I just wanted to note that the answer to this question is found at the top of the main README file:



Thanks all for yours answers, I’ve missed this information! It’s good to see the support is back again!

Have a look at these topics for opam on Windows setup instructions.

  1. [pre-ANN] Installing Windows OCaml 5.0.0 in opam
  2. Sunsetting opam-repository-mingw
    The experience is a bit rough right now. This PR Create GH Actions for testing Windows support. by tmcgilchrist · Pull Request #40 · dialohq/ocaml-grpc · GitHub is my latest on getting OCaml 5 mingw working on Windows 10.
1 Like