The release of OCaml 4.12.0 is close.
The set of new features has been stabilized, and core opam packages already
work with this release. After three alpha releases, we have created a first
beta version to help you adapt your software to the new features ahead of the
release. Compared to the last alpha, this beta contains only three new bug fixes
and one change to the standard library.
The base compiler can be installed as an opam switch with the following commands
opam update
opam switch create 4.12.0~beta1 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
If you want to tweak the configuration of the compiler, you can pick configuration options with
opam update
opam switch create <switch_name> --packages=ocaml-variants.4.12.0~beta1+options,<option_list> --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
where <option_list> is a comma separated list of ocaml-option-* packages. For
instance, for a flambda and afl enabled switch:
opam switch create 4.12.0~beta1+flambda+afl --packages=ocaml-variants.4.12.0~beta1+options,ocaml-option-flambda,ocaml-option-afl --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
All available options can be listed with “opam search ocaml-option”.
The source code is available at these addresses:
https://github.com/ocaml/ocaml/archive/4.12.0-beta1.tar.gz
https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-4.12.0~beta1.tar.gz
If you want to test this version, you may want to install the alpha opam repository
with
opam repo add alpha git://github.com/kit-ty-kate/opam-alpha-repository.git
This alpha repository contains various packages patched with fixes in the
process of being upstreamed. Once the repository installed, these patched
packages will take precedence over the non-patched version.
If you find any bugs, please report them here:
Issues · ocaml/ocaml · GitHub
Changes from the third alpha release
Postponed features
-
9533, 10105, 10127 : Added String.starts_with and String.ends_with.
(Bernhard Schommer, review by Daniel Bünzli, Gabriel Scherer and
Alain Frisch)
Additional bug fixes
-
9096, 10096: fix a 4.11.0 performance regression in classes/objects
declared within a function
(Gabriel Scherer, review by Leo White, report by Sacha Ayoun) -
10106, 10112: some expected-type explanations were forgotten
after some let-bindings
(Gabriel Scherer, review by Thomas Refis and Florian Angeletti,
report by Daniil Baturin) -
9326, 10125: Gc.set incorrectly handles the three
custom_*
fields,
causing a performance regression
(report by Emilio Jesús Gallego Arias, analysis and fix by Stephen Dolan,
code by Xavier Leroy, review by Hugo Heuzard and Gabriel Scherer)