OCaml 5.4.0 released
Florian Angeletti <[email protected]> Thu, 9 Oct 2025 22:38:40 +0200 (CEST)
| Newsgroups | gmane.comp.lang.caml.announce |
|---|---|
| Message-ID | <[email protected]> |
--=_6c69a8ab-c0e1-446d-a994-2dcc8afa4d44
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Dear Ocaml users,=20
We have the pleasure of celebrating the birthdays of Camille Saint-Sa=EBns =
and=20
Karl Schwarzschild by announcing the release of OCaml version 5.4.0.=20
Some of the highlights of OCaml 5.4.0 are:=20
* Labelled tuples=20
It is now possible to add labels on tuple fields=20
let ( * ) (x,~dx) (y,~dx:dy) =3D=20
x*.y, ~dx:(x *. dy +. y *. dx )=20
Those labeled tuples are equivalent to SML records: they are an ordered and=
=20
structurally-typed variants of records. In particular, this implies that=20
partial pattern matching on tuples is only possible for labelled tuples wit=
h a=20
known type:=20
type t =3D float * dx:float=20
let v (x_and_dx:t) =3D let (x, .. ) =3D x_and_dx in x=20
* Array literal syntax support for immutable arrays and `floatarray`s=20
The array literal syntax is now shared by array-like primitive types,=20
like 'a array, floatarray and the new immutable array iarray.=20
For instance, this code=20
let x =3D Float.Array.of_list [0.;1.;2.]=20
can now be written=20
let x : Float.Array.t =3D [|0.; 1.; 2.|]=20
This syntax is also supported in patterns=20
let one =3D match x with=20
| [|_;y;_|] -> Some y=20
| _ -> None=20
However array indexing still needs to go through user-defined indexing oper=
ators=20
let (.$()) =3D Float.Array.get=20
let (.$()<-) =3D Float.Array.set=20
let () =3D x.$(0) <- x.$(1)=20
* Immutable arrays=20
Along with shared array literals, OCaml 5.4 adds support for immutable arra=
ys.=20
let v: int iarray =3D [| 0; 1; 2 |]=20
Immutable arrays are covariant in the type of their elements, it is thus po=
ssible to coerce=20
immutable arrays with no costs at runtime:=20
let i1: _ iarray =3D [|object method m =3D 0 end|]=20
let i2 =3D ( i1 :> < > iarray)=20
* Atomic record fields=20
It is now possible to mark a field of a record as atomic. Atomic operations=
on=20
those fields require to use the new `Atomic.Loc` submodule after accessing =
the=20
location with the `[%atomic.loc ...]` builtin extension. For instance,=20
type 'a mpsc_list =3D { mutable head:'a list; mutable tail: 'a list [@atomi=
c] }=20
let rec push t x =3D=20
let before =3D Atomic.Loc.get [%atomic.loc t.tail] in=20
let after =3D x :: before in=20
if not (Atomic.Loc.compare_and_set [%atomic.loc t.tail] before after) then=
=20
push t x=20
Moreover, it is forbidden to pattern match on atomic fields:=20
let f { head; tail } =3D tail=20
>Error: Atomic fields (here tail) are forbidden in patterns,=20
> as it is difficult to reason about when the atomic read=20
> will happen during pattern matching: the field may be read=20
> zero, one or several times depending on the patterns around it.=20
in order to make all reads on those atomic fields explicit.=20
* Four new standard library modules: Pair, Pqueue, Repr, and Iarray=20
The standard library has been extended with four new modules:=20
- Pair: functions for working on pairs=20
let ones =3D Pair.map_fst succ (0,1)=20
- Pqueue: priority queues, generic or not=20
module Int_pqueue =3D Pqueue.MakeMin(Int)=20
let q =3D Int_pqueue.of_list [4;0;5;7]=20
let some_zero =3D Int_pqueue.pop_min q=20
- Repr: physical and structural equality, comparison function,=20
more generically all functions dependent on the memory representation=20
of values.=20
let f =3D Repr.phys_equal (ref 0) (ref 0)=20
- Iarray: functions on immutable arrays=20
let a =3D Iarray.init 10 Fun.id=20
let b =3D Iarray.map succ a=20
* Restored "memory cleanup upon exit" mode=20
This mode allows to restart many time the OCaml runtime in C-driven program=
s=20
that interact with OCaml libraries. It is also useful to reduce noise when=
=20
tracking memory leaks in C code running the OCaml runtime. To get around=20
cancellation issues, the restored mode currently assumes that all domains a=
re=20
joined before exiting the OCaml runtime.=20
* A new section in the reference manual on profiling OCaml programs on Linu=
x and macOS=20
A new section in the reference manual(https://ocaml.org/manual/profil.html)=
explains=20
how to use OS specific profiling tools to profile native OCaml programs.=20
* A lot of incremental changes:=20
- Many runtime and code generation improvements=20
- More than thirty new standard library functions=20
- Nearly a dozen improved error messages=20
- Around fifty bug fixes=20
Please report any unexpected behaviours on the OCaml issue tracker at=20
- https://github.com/ocaml/ocaml/issues=20
and post any questions or comments you might have on our discussion forums:=
=20
- https://discuss.ocaml.org=20
The full list of changes can be found in the full changelog below.=20
Happy hacking,=20
Florian Angeletti for the OCaml team.=20
Installation Instructions=20
-------------------------------=20
The base compiler can be installed as an opam switch with the following com=
mands:=20
opam update=20
opam switch create 5.4.0=20
The source code for the release is also directly available on:=20
- GitHub: https://github.com/ocaml/ocaml/releases/download/5.4.0/ocaml-5.4.=
0.tar.gz=20
- OCaml archives at Inria: https://caml.inria.fr/pub/distrib/ocaml-5.4/ocam=
l-5.4.0.tar.gz=20
Fine-Tuned Compiler Configuration=20
-----------------------------------------------=20
If you want to tweak the configuration of the compiler, you can switch to t=
he option variant with:=20
opam update=20
opam switch create <switch_name> ocaml-variants.5.4.0+options <option_list>=
=20
where `<option_list>` is a space separated list of `ocaml-option-*` package=
s. For instance, for a `flambda` and `no-flat-float-array` switch:=20
opam switch create 5.4.0+flambda+nffa ocaml-variants.5.4.0+options ocaml-op=
tion-flambda ocaml-option-no-flat-float-array=20
Changelog:=20
----------------=20
Language features:=20
--------------------------=20
- #13097(https://github.com/ocaml/ocaml/issues/13097): added immutable arra=
ys (`'a iarray` type, Iarray stdlib module)=20
(Antal Spector-Zabusky and Olivier Nicole, review by Gabriel Scherer,=20
Jeremy Yallop and Vincent Laviron)=20
- #13340(https://github.com/ocaml/ocaml/issues/13340): Array literal syntax=
[| e1; ...; en |] can now be used to=20
denote values of type `'a array` and `'a iarray` and `floatarray`,=20
both in expressions and patterns. The compiler disambiguates each=20
case by using contextual type information (assuming `'a array`=20
by default).=20
(Nicol=E1s Ojeda B=E4r, review by Richard Eisenberg, Jeremy Yallop, Jacques=
=20
Garrigue, and Gabriel Scherer)=20
- #13498(https://github.com/ocaml/ocaml/issues/13498): Tuple fields are now=
optionally labeled:=20
`(x:42, y:0)` and `let (~x, ~y) =3D ... in ...`.=20
(Ryan Tjoa and Chris Casinghino, review by Gabriel Scherer, Chris Casinghin=
o,=20
and Leo White)=20
- RFCs#39(https://github.com/ocaml/ocaml/issues/39), #13404(https://github.=
com/ocaml/ocaml/issues/13404): atomic record fields=20
`{ ...; mutable readers : int [@atomic]; ... }`=20
`Atomic.Loc.fetch_and_add [%atomic.loc data.readers] 1`=20
(Cl=E9ment Allain and Gabriel Scherer, review by KC Sivaramakrishnan,=20
Basile Cl=E9ment and Olivier Nicole)=20
Standard library:=20
-------------------=20
* (*breaking change*) #14124(https://github.com/ocaml/ocaml/issues/14124): =
Do not raise Invalid_argument on negative List.{drop,take}.=20
(Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s Ojeda B=E4r)=20
- #13696(https://github.com/ocaml/ocaml/issues/13696): Add Result.product a=
nd Result.Syntax:=20
`let open Result.Syntax in let* x =3D ... in ...`=20
(Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s Ojeda B=E4r)=20
- #12871(https://github.com/ocaml/ocaml/issues/12871): Add the Pqueue modul=
e to the stdlib. It implements priority queues.=20
(Jean-Christophe Filli=E2tre, review by Daniel B=FCnzli, L=E9o Andr=E8s and=
=20
Gabriel Scherer)=20
- #13760(https://github.com/ocaml/ocaml/issues/13760): Add String.{edit_dis=
tance,spellcheck}=20
(Daniel B=FCnzli, review by wikku, Nicol=E1s Ojeda B=E4r, Gabriel Scherer a=
nd=20
Florian Angeletti)=20
- #13753(https://github.com/ocaml/ocaml/issues/13753), #13755(https://githu=
b.com/ocaml/ocaml/issues/13755): Add Stdlib.Repr:=20
Repr.phys_equal and Repr.compare are more explicit than (=3D=3D) and `compa=
re`.=20
(Kate Deplaix, Thomas Blanc and L=E9o Andr=E8s, review by Gabriel Scherer,=
=20
Florian Angeletti, Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli and Jeremy Yallop=
)=20
- #13695(https://github.com/ocaml/ocaml/issues/13695): Add Stdlib.Char.Asci=
i=20
(Daniel B=FCnzli, review by by Nicol=E1s Ojeda B=E4r and Jeremy Yallop)=20
- #13720(https://github.com/ocaml/ocaml/issues/13720): Add Result.{get_ok',=
error_to_failure}=20
(Daniel B=FCnzli, review by wikku, Gabriel Scherer, Nicol=E1s Ojeda B=E4r,=
=20
Vincent Laviron and hirrolot)=20
- #13885(https://github.com/ocaml/ocaml/issues/13885): Add Dynarray.{exists=
2, for_all2}.=20
(T. Kinsart, review by Daniel B=FCnzli, Gabriel Scherer, and Nicol=E1s Ojed=
a B=E4r)=20
* (*breaking change*) #13862(https://github.com/ocaml/ocaml/issues/13862): =
Make List.sort_uniq keep the first occurrences of duplicates.=20
(Beno=EEt Jubin, review by Nicol=E1s Ojeda B=E4r, Gabriel Scherer)=20
- #13836(https://github.com/ocaml/ocaml/issues/13836): Add [Float.]Array.{e=
qual,compare}.=20
(Daniel B=FCnzli, review by Nicol=E1s Ojeda B=E4r and Gabriel Scherer)=20
- #13796(https://github.com/ocaml/ocaml/issues/13796): Add Uchar.utf_8_deco=
de_length_of_byte and=20
Uchar.max_utf_8_decode_length.=20
(Daniel B=FCnzli, review by Nicol=E1s Ojeda B=E4r and Florian Angeletti)=20
- #13768(https://github.com/ocaml/ocaml/issues/13768): Add Either.get_left =
and Either.get_right=20
(T. Kinsart, review by Nicol=E1s Ojeda B=E4r and Florian Angeletti)=20
* (*breaking change*) #13570(https://github.com/ocaml/ocaml/issues/13570), =
#13794(https://github.com/ocaml/ocaml/issues/13794): Format, add an out_wid=
th function to Format device for=20
approximating unicode width.=20
(Florian Angeletti, review by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli,=20
and Gabriel Scherer)=20
- #13731(https://github.com/ocaml/ocaml/issues/13731): Add Either.retract=
=20
(Daniel B=FCnzli, review by Nicol=E1s Ojeda B=E4r and David Allsopp)=20
- #13729(https://github.com/ocaml/ocaml/issues/13729): Add Seq.filteri=20
(T. Kinsart, review by Nicol=E1s Ojeda B=E4r and Daniel B=FCnzli)=20
- #13721(https://github.com/ocaml/ocaml/issues/13721): Add Result.retract=
=20
(Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s Ojeda B=E4r and=20
David Allsopp)=20
- #13310(https://github.com/ocaml/ocaml/issues/13310): Add Stdlib.Pair=20
(Victoire Noizet, review by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli, Xavier =
Van de=20
Woestyne, Jeremy Yallop and Florian Angeletti)=20
- #13662(https://github.com/ocaml/ocaml/issues/13662): Add eager boolean op=
erations Bool.logand, Bool.logor, Bool.logxor=20
(Jeremy Yallop, review by Nicol=E1s Ojeda B=E4r)=20
- #13463(https://github.com/ocaml/ocaml/issues/13463), #13572(https://githu=
b.com/ocaml/ocaml/issues/13572): Avoid raising Queue.empty in Format when i=
t is used=20
concurrently, raise a specific exception instead.=20
(Chritophe Raffalli, review by Gabriel Scherer and Daniel B=FCnzli)=20
- #13620(https://github.com/ocaml/ocaml/issues/13620): Avoid copying the st=
ring in String.concat, String.sub and=20
String.split_on_char when the full string is returned.=20
(Christophe Raffalli, review by Nicol=E1s Ojeda B=E4r and Gabriel Scherer a=
nd=20
Hugo Heuzard)=20
- #13727(https://github.com/ocaml/ocaml/issues/13727): Reimplement Sys.gete=
nv_opt not to use exceptions internally, meaning=20
that the current backtrace is preserved when Sys.getenv_opt returns None.=
=20
(David Allsopp, review by Nicol=E1s Ojeda B=E4r, Josh Berdine and Gabriel S=
cherer)=20
- #13737(https://github.com/ocaml/ocaml/issues/13737): Avoid closure alloca=
tions in Weak.Make.add when resizing the=20
table=20
(Vincent Laviron, review by Gabriel Scherer and Daniel B=FCnzli)=20
- #13740(https://github.com/ocaml/ocaml/issues/13740): Improve performance =
of Weak.find_aux=20
(Josh Berdine, review by Gabriel Scherer)=20
- #13782(https://github.com/ocaml/ocaml/issues/13782): Improve performance =
and type safety of Type.Id by using=20
[%extension_constructor] instead of Obj.Extension_constructor.of_val.=20
(Basile Cl=E9ment, review by Vincent Laviron and Nicol=E1s Ojeda B=E4r)=20
- #13589(https://github.com/ocaml/ocaml/issues/13589): Expose Sys.io_buffer=
_size, the size of internal buffers used by the=20
runtime system and the `unix` library.=20
(Yves Ndiaye and Nicol=E1s Ojeda B=E4r, review by Daniel B=FCnzli and Nicol=
=E1s Ojeda=20
B=E4r)=20
- #13569(https://github.com/ocaml/ocaml/issues/13569): add a `Format.format=
_text` which adds break hints to format literals.=20
(Florian Angeletti, review by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli,=20
and Gabriel Scherer)=20
- #13578(https://github.com/ocaml/ocaml/issues/13578): On Windows, use the =
OS CSPRNG to seed the Stdlib.Random generator.=20
(Antonin D=E9cimo, review by Miod Vallat, Nicol=E1s Ojeda B=E4r, and Xavier=
Leroy)=20
- #13859(https://github.com/ocaml/ocaml/issues/13859): Fix Weak.get_copy no=
t darkening custom blocks=20
(Josh Berdine, review by Stephen Dolan)=20
- #13909(https://github.com/ocaml/ocaml/issues/13909): Add `Dynarray.unsafe=
_to_iarray`=20
(Olivier Nicole, review by Daniel B=FCnzli, Stefan Muenzel and Gabriel Sche=
rer,=20
request by Daniel B=FCnzli)=20
- #13932(https://github.com/ocaml/ocaml/issues/13932): Add List.singleton a=
nd Seq.singleton=20
(David Allsopp, tariffs applied by Nicol=E1s Ojeda B=E4r and Gabriel Schere=
r)=20
* (*breaking change*) #13843(https://github.com/ocaml/ocaml/issues/13843): =
Add signal definitions for SIGIO and SIGWINCH. Introduces a=20
type alias for signal int, signal_to_string to convert OCaml signal numbers=
=20
to their POSIX equivalent names, and signal_of_int/signal_to_int for=20
converting between OCaml and platform signal numbers. (Reported in #13825(h=
ttps://github.com/ocaml/ocaml/issues/13825))=20
(Tim McGilchrist, review by David Allsopp, Nicol=E1s Ojeda B=E4r, Daniel B=
=FCnzli=20
Jan Midtgaard and Miod Vallat)=20
Runtime system:=20
-----------------------=20
- #13500(https://github.com/ocaml/ocaml/issues/13500): Add frame pointers s=
upport for ARM64 on Linux and macOS.=20
(Tim McGilchrist, review by KC Sivaramakrishnan, Fabrice Buoro=20
and Miod Vallat)=20
- #12964(https://github.com/ocaml/ocaml/issues/12964): Reintroduce "memory =
cleanup upon exit" mode. The cleanup will=20
however be incomplete if not all domains have been joined when the main=20
domain terminates.=20
(Miod Vallat, review by KC Sivaramakrishnan, feedback from Nick Barnes=20
and Gabriel Scherer)=20
- #13582(https://github.com/ocaml/ocaml/issues/13582): Enable software pref=
etching support for ARM64, s390x, PPC64 and RiscV.=20
Used during GC marking and sweeping to speed up both operations by=20
prefetching data.=20
(Tim McGilchrist, review by Nick Barnes, Antonin D=E9cimo,=20
Stephen Dolan and Miod Vallat)=20
- #13675(https://github.com/ocaml/ocaml/issues/13675): Make Unix.map_file m=
emory show up in Gc.Memprof.=20
(Stephen Dolan, review by Guillaume Munch-Maccagnoni and Gabriel Scherer)=
=20
- #13785(https://github.com/ocaml/ocaml/issues/13785): Add `Runtime_events.=
Timestamp.get_current`.=20
(Simon Cruanes)=20
- #13774(https://github.com/ocaml/ocaml/issues/13774): Fix for inaccurate l=
ive blocks/words stats in compaction.=20
(Sadiq Jaffer, report by KC Sivaramakrishnan and Jan Midtgaard, review by=
=20
Gabriel Scherer)=20
- #13773(https://github.com/ocaml/ocaml/issues/13773): Ensure that shared p=
ool owners are correctly set on pool adoption.=20
(Stephen Dolan, review by Sadiq Jaffer and Gabriel Scherer)=20
* (*breaking change*) #11449(https://github.com/ocaml/ocaml/issues/11449), =
#13497(https://github.com/ocaml/ocaml/issues/13497): Add caml_stat_char_arr=
ay_{to,of}_os functions allowing=20
conversion of string data which may contain NUL characters. Correct=20
implementation of caml_stat_strdup_to_utf16 to raise Out_of_memory instead =
of=20
returning of NULL (the behaviour of caml_stat_strdup_to_os was inconsistent=
=20
between Unix/Windows).=20
(David Allsopp, review by Nick Barnes, Antonin D=E9cimo and Miod Vallat)=20
- #13352(https://github.com/ocaml/ocaml/issues/13352): Concurrency refactor=
s and cleanups.=20
(Antonin D=E9cimo, review by Gabriel Scherer, David Allsopp, and Miod Valla=
t)=20
- #13437(https://github.com/ocaml/ocaml/issues/13437): Stop using GetProcAd=
dress to load functions that were not=20
available in older, now unsupported Windows versions.=20
(Antonin D=E9cimo, review by Nicol=E1s Ojeda B=E4r and David Allsopp)=20
- #13470(https://github.com/ocaml/ocaml/issues/13470): Constify some functi=
on parameters, flags tables, and some=20
pointers in C code (take 3).=20
(Antonin D=E9cimo, review by Stephen Dolan and Miod Vallat)=20
- #13492(https://github.com/ocaml/ocaml/issues/13492): Parse the CAML_LD_LI=
BRARY_PATH environment variable for the=20
shared_libs_path item in `ocamlrun -config` in addition to displaying the=
=20
entries found in ld.conf.=20
(David Allsopp, review by Stephen Dolan)=20
- #13496(https://github.com/ocaml/ocaml/issues/13496): Add missing .type an=
d .size directives to main frametable to silence=20
warnings from the linker when using libasmrun_shared on amd64 and power. Th=
e=20
other backends already carried these directives.=20
(David Allsopp, review by Tim McGilchrist and Miod Vallat)=20
- #13354(https://github.com/ocaml/ocaml/issues/13354): Use C99 flexible arr=
ay member syntax everywhere.=20
(Antonin D=E9cimo, review by Miod Vallat, Gabriel Scherer, and Xavier Leroy=
)=20
- #11865(https://github.com/ocaml/ocaml/issues/11865), #13584(https://githu=
b.com/ocaml/ocaml/issues/13584): Fix a deadlock triggered by deleting C roo=
ts from C finalisers=20
(Stephen Dolan, report by Timothy Bourke, review by Mark Shinwell and Damie=
n=20
Doligez)=20
- #13613(https://github.com/ocaml/ocaml/issues/13613): Functions from caml/=
skiplist.h and caml/lf_skiplist.h no longer raise=20
Out_of_memory exceptions that the runtime could not handle.=20
(Guillaume Munch-Maccagnoni, review by Stephen Dolan)=20
- #13575(https://github.com/ocaml/ocaml/issues/13575), #13635(https://githu=
b.com/ocaml/ocaml/issues/13635): Maintain OCaml frame pointers correctly ev=
en when using=20
C libraries that do not support them.=20
(Stephen Dolan and David Allsopp, report by Thomas Leonard, review by Tim=
=20
McGilchrist and Fabrice Buoro)=20
- #13643(https://github.com/ocaml/ocaml/issues/13643): Allow values reachab=
le from ephemeron keys to be collected by minor GC=20
(Stephen Dolan, review by Fran=E7ois Bobot)=20
- #13701(https://github.com/ocaml/ocaml/issues/13701): optimize `caml_conti=
nuation_use` based on #12735(https://github.com/ocaml/ocaml/issues/12735)=
=20
(Hugo Heuzard, review by KC Sivaramakrishnan)=20
- #13227(https://github.com/ocaml/ocaml/issues/13227), #13714(https://githu=
b.com/ocaml/ocaml/issues/13714): Review of locking in the multicore runtime=
. Fix=20
deadlocks in runtime events and potential deadlocks with named=20
values.=20
(Guillaume Munch-Maccagnoni, review by Gabriel Scherer, tests by=20
Jan Midtgaard)=20
- #13736(https://github.com/ocaml/ocaml/issues/13736): Fix major GC pacing =
bug triggered by synchronous collections.=20
(Nick Barnes, review by Damien Doligez and Tim McGilchrist)=20
- #13827(https://github.com/ocaml/ocaml/issues/13827): Avoid re-marking eph=
emerons with trivial data.=20
(Stephen Dolan, review by Nick Barnes and Josh Berdine, benchmarking by=20
Nicol=E1s Ojeda B=E4r)=20
- #13300(https://github.com/ocaml/ocaml/issues/13300), #13861(https://githu=
b.com/ocaml/ocaml/issues/13861): introduce `Gc.ramp_up` to explicitly mark =
ramp-up=20
phases of memory consumption and avoid GC overwork. Ramp-up behaviors=20
are worse with OCaml 5 than with OCaml 4 due to higher sensitivity=20
to excessive pacing computations. Indicating ramp-up explicitly eliminates=
=20
the main known slowdown of OCaml 5 (relative to OCaml 4) for Coq/Rocq.=20
(Gabriel Scherer, review by Damien Doligez and Guillaume Munch-Maccagnoni,=
=20
report by Emilio Jes=FAs Gallego Arias and Olivier Nicole)=20
- #14057(https://github.com/ocaml/ocaml/issues/14057): Don't update memprof=
too early at the end of a minor GC.=20
(Nick Barnes, review by Damien Doligez).=20
Code generation and optimizations:=20
-----------------------------------------------=20
- #13262(https://github.com/ocaml/ocaml/issues/13262), #14074(https://githu=
b.com/ocaml/ocaml/issues/14074): fix performance issue on Apple Silicon mac=
OS by emitting=20
`stlr` instead of `dmb ishld; str`.=20
(KC Sivaramakrishnan, report by Fran=E7ois Pottier, analysis by Fr=E9d=E9ri=
c Bour,=20
Xavier Leroy, Miod Vallat, Gabriel Scherer and Stephen Dolan, review by Mio=
d=20
Vallat, Vincent Laviron and Xavier Leroy)=20
* (*breaking change*) #13050(https://github.com/ocaml/ocaml/issues/13050), =
#14104(https://github.com/ocaml/ocaml/issues/14104), #14143(https://github.=
com/ocaml/ocaml/issues/14143): Use '$' instead of '.' to separate module na=
mes=20
in symbol names on macOS and Windows (including the Cygwin backend).=20
This changes mangling of OCaml identifiers on those operating systems from=
=20
`camlModule.name_NNN` to `camlModule$name_NNN`. Additionally it=20
changes the encoding of special characters from $xx (two hex digits)=20
to $$xx (two dollar signs followed by two hex digits).=20
(Tim McGilchrist, with contributions from Xavier Leroy,=20
reviewed by Xavier Leroy, Miod Vallat, Gabriel Scherer,=20
Nick Barnes and Hugo Heuzard)=20
- #13807(https://github.com/ocaml/ocaml/issues/13807): Allow unaligned memo=
ry accesses on ARM64.=20
(Matthew Else, review by Xavier Leroy)=20
- #13565(https://github.com/ocaml/ocaml/issues/13565): less tagging in swit=
ches compiled to affine transformations=20
by ocamlopt.=20
(Gabriel Scherer and Cl=E9ment Allain, review by Vincent Laviron,=20
report by Vesa Karvonen)=20
- #13672(https://github.com/ocaml/ocaml/issues/13672) Avoid register stall =
on conversion instructions on amd64.=20
(Pierre Chambart, review by Gabriel Scherer and Xavier Leroy,=20
report by Patrick Nicodemus)=20
- #13667(https://github.com/ocaml/ocaml/issues/13667): (originally #11162(h=
ttps://github.com/ocaml/ocaml/issues/11162)) Fix instr_size computation on =
arm64.=20
(Stephen Dolan and Tim McGilchrist, review by Xavier Leroy=20
and David Allsopp)=20
- #13758(https://github.com/ocaml/ocaml/issues/13758): Propagate more value=
kinds in Flambda to allow more unboxing=20
(Vincent Laviron, review by Pierre Chambart)=20
- #13759(https://github.com/ocaml/ocaml/issues/13759): Propagate more type =
information from clambda to cmm.=20
(Pierre Chambart, review by Gabriel Scherer)=20
- #13735(https://github.com/ocaml/ocaml/issues/13735): Follow the behaviour=
of the C compiler to decide whether to emit the=20
`.size` and `.type` directives and the `.note.GNU-stack` section=20
(Samuel Hym, review by Miod Vallat, Antonin D=E9cimo and Gabriel Scherer)=
=20
Other libraries:=20
--------------------=20
* (*breaking change*) #13435(https://github.com/ocaml/ocaml/issues/13435): =
On Windows, use system calls for `Filename.get_temp_dir_name` instead=20
of directly reading the environment, which in particular improves the secur=
ity=20
of OCaml processes running in the SYSTEM security context by mitigating=20
privileged file operation attacks. For all other processes running with the=
=20
default environment (where `TEMP` is set), there is no discernible change.=
=20
(Antonin D=E9cimo, review by Nicol=E1s Ojeda B=E4r and David Allsopp)=20
- #13504(https://github.com/ocaml/ocaml/issues/13504), #13625(https://githu=
b.com/ocaml/ocaml/issues/13625), #14223(https://github.com/ocaml/ocaml/issu=
es/14223): Add `Thread.set_current_thread_name`.=20
(Romain Beauxis, review by Gabriel Scherer and Antonin D=E9cimo)=20
* (*breaking change*) #13376(https://github.com/ocaml/ocaml/issues/13376): =
Allow Dynlink.loadfile_private to load bytecode libraries with=20
internal dependencies=20
(Vincent Laviron, report by St=E9phane Glondu, review by Nicol=E1s Ojeda B=
=E4r=20
and Xavier Leroy)=20
- #13429(https://github.com/ocaml/ocaml/issues/13429): add `Unix.sigwait`, =
a binding to the `sigwait` system call;=20
implement `Thread.wait_signal` using `Unix.sigwait`, and=20
`Thread.sigmask` using `Unix.sigprocmask`.=20
(Xavier Leroy, review by Antonin D=E9cimo, Gabriel Scherer, Miod Vallat)=20
- #13442(https://github.com/ocaml/ocaml/issues/13442), #13452(https://githu=
b.com/ocaml/ocaml/issues/13452): Fix Unix.getgroups for users belonging to =
more than 32 groups=20
when using musl=20
(Kate Deplaix, review by Gabriel Scherer, Antonin D=E9cimo, Anil Madhavaped=
dy)=20
- #13576(https://github.com/ocaml/ocaml/issues/13576): Introduce internal h=
elpers to convert between time representations.=20
On Windows, prevent erroneously waiting for an unbounded time in Unix.selec=
t=20
if more than 64 file descriptors per lists are watched, or if watching=20
non-socket file descriptors, and a timeout longer than $2^{32}$ millisecond=
s=20
is used. Cap the timeout to $2^{32}$ milliseconds.=20
(Antonin D=E9cimo, review by Gabriel Scherer and Miod Vallat)=20
- #13921(https://github.com/ocaml/ocaml/issues/13921): Set cloexec correctl=
y on CRT file descriptors created by the Unix=20
library on Windows. The inheritance on the underlying Win32 handles was=20
correctly set, but the book-keeping for the CRT was leaking the value of=20
non-inherited handles which combined with re-use of HANDLE values within=20
processes could appear to make a CRT file descriptor "re-open".=20
(David Allsopp, review by Nicol=E1s Ojeda B=E4r)=20
Tools:=20
-------=20
- #13686(https://github.com/ocaml/ocaml/issues/13686): Fix Python debugger =
extensions (for LLDB and GDB) to restore=20
functionality broken by #13272(https://github.com/ocaml/ocaml/issues/13272)=
in 5.3.=20
(Nick Barnes, review by Tim McGilchrist Gabriel Scherer)=20
- #12019(https://github.com/ocaml/ocaml/issues/12019): ocamlc: add `align_d=
ouble` and `align_int64` to `ocamlc -config`=20
output.=20
(Romain Beauxis, review by David Allsopp)=20
- #12642(https://github.com/ocaml/ocaml/issues/12642), #13536(https://githu=
b.com/ocaml/ocaml/issues/13536), #14184(https://github.com/ocaml/ocaml/issu=
es/14184), #14192(https://github.com/ocaml/ocaml/issues/14192): in the topl=
evel, print shorter paths for=20
constructors and labels when only some modules along their path are open.=
=20
(Gabriel Scherer, review by Florian Angeletti)=20
- #13199(https://github.com/ocaml/ocaml/issues/13199), #13485(https://githu=
b.com/ocaml/ocaml/issues/13485), #13665(https://github.com/ocaml/ocaml/issu=
es/13665), #13762(https://github.com/ocaml/ocaml/issues/13762), #13965(http=
s://github.com/ocaml/ocaml/issues/13965): Support running native debuggers =
in=20
ocamltest.=20
(Tim McGilchrist, Sebastien Hinderer, David Allsopp, Antonin D=E9cimo, revi=
ew by=20
Sebastien Hinderer, Gabriel Scherer, Antonin D=E9cimo, and Tim McGilchrist)=
=20
- #13764(https://github.com/ocaml/ocaml/issues/13764), #13779(https://githu=
b.com/ocaml/ocaml/issues/13779): add missing "-keywords" flag to ocamldep a=
nd ocamlprof=20
(Florian Angeletti, report by Prashanth Mundkur, review by Gabriel Scherer)=
=20
- #13877(https://github.com/ocaml/ocaml/issues/13877): ocamldoc, add a `-la=
tex-escape-underscore` flag to control the=20
escaping of `_` underscore in latex references (in order to be able to matc=
h=20
odoc behaviour).=20
(Florian Angeletti, review by Gabriel Scherer)=20
- #13906(https://github.com/ocaml/ocaml/issues/13906): Add support for a `m=
ulticore` tag in ocamltest and use it for=20
tests that fail on mono-core systems.=20
(St=E9phane Glondu, review by Nicol=E1s Ojeda B=E4r)=20
Manual and documentation:=20
-------------------------=20
- #13751(https://github.com/ocaml/ocaml/issues/13751): Document support for=
profiling with Linux perf and frame pointers.=20
(Tim McGilchrist, review by Gabriel Scherer and Miod Vallat)=20
- #12452(https://github.com/ocaml/ocaml/issues/12452): Add examples to Stdl=
ib.Fun documentation.=20
(Hazem ElMasry, review by Florian Angeletti and Gabriel Scherer)=20
- #13924(https://github.com/ocaml/ocaml/issues/13924): Document how to put =
[@deprecated] on let bindings, constructors, etc=20
in the manual=20
(Valentin Gatien-Baron, review by Florian Angeletti)=20
- #13694(https://github.com/ocaml/ocaml/issues/13694): Fix name for caml_ha=
sh_variant in the C interface.=20
(Michael Hendricks)=20
- #13732(https://github.com/ocaml/ocaml/issues/13732): Document that custom=
finalizers must not access the OCaml heap, etc.=20
(Josh Berdine, review by Stephen Dolan and Guillaume Munch-Maccagnoni)=20
Type system:=20
------------=20
* (*breaking change*) #13830(https://github.com/ocaml/ocaml/issues/13830): =
fail rather than silently create abstract module types when avoiding=20
(i.e. hiding) signature items, as in:=20
```ocaml=20
module N =3D struct=20
open (struct type t =3D A | B end)=20
module type T =3D sig type u =3D t * int end=20
end=20
```=20
Before, it was succeeding with `module N : sig module type T end`, now it=
=20
fails. Similarly for anonymous functor calls (of the form `F(struct ... end=
))=20
(Clement Blaudeau, review by Gabriel Scherer)=20
Compiler user-interface and warnings:=20
-------------------------------------=20
- #13817(https://github.com/ocaml/ocaml/issues/13817): align spellchecking =
hints with the possibly misspelled identifier/=20
Error: Unbound type constructor "aray"=20
Hint: Did you mean "array"?=20
(Florian Angeletti, suggestion by Daniel B=FCnzli, review by Gabriel Schere=
r)=20
- #13587(https://github.com/ocaml/ocaml/issues/13587): Enable native backen=
d on x86_64 GNU/Hurd.=20
(Samuel Thibault, review by Antonin D=E9cimo, S=E9bastien Hinderer and Miod=
=20
Vallat)=20
- #13663(https://github.com/ocaml/ocaml/issues/13663): Improve the error me=
ssage when GADT parameter variance cannot be=20
checked.=20
(Stefan Muenzel, review by Gabriel Scherer and Florian Angeletti)=20
- #13646(https://github.com/ocaml/ocaml/issues/13646): Improve the error me=
ssages when a recursive module type=20
references another recursive module type.=20
(Stefan Muenzel, review by Florian Angeletti and Gabriel Scherer)=20
- #13702(https://github.com/ocaml/ocaml/issues/13702), #13865(https://githu=
b.com/ocaml/ocaml/issues/13865): Specialized error messages for functors ap=
pearing in contexts=20
where non-functors were expected `module A: sig ... end =3D Set.Make`=20
(and the reverse)=20
(Florian Angeletti, report by Jeremy Yallop, review by Gabriel Scherer)=20
- #13788(https://github.com/ocaml/ocaml/issues/13788), #13813(https://githu=
b.com/ocaml/ocaml/issues/13813): Keep the module context in spellchecking h=
ints.=20
`Fun.protact` now prompts `Did you mean "Fun.protect?"` rather than=20
`Did you mean "protect?"`.=20
(Florian Angeletti, suggestion by Daniel B=FCnzli, review by Gabriel Schere=
r)=20
- #13428(https://github.com/ocaml/ocaml/issues/13428): support dump=3D[sour=
ce | parsetree | lambda | ... | cmm | ...]=20
in OCAMLRUNPARAM=20
(Gabriel Scherer, review by Vincent Laviron)=20
- #13493(https://github.com/ocaml/ocaml/issues/13493): Clearer error messag=
e in ocamlc for conflicting link options for=20
C stubs when shared libraries are not available.=20
(David Allsopp, review by Gabriel Scherer)=20
- #13563(https://github.com/ocaml/ocaml/issues/13563), lighter inline code =
styling for output without bold support: inline=20
code is no longer printed as "..." to avoid confusion with OCaml strings.=
=20
(Florian Angeletti, review by Richard Eisenberg)=20
- #13568(https://github.com/ocaml/ocaml/issues/13568), composable formattin=
g for warning and alert messages=20
(Florian Angeletti, review by Richard Eisenberg)=20
- #13601(https://github.com/ocaml/ocaml/issues/13601): Enable natdynlink on=
x86_64 GNU/Hurd=20
(Samuel Thibault, review by S=E9bastien Hinderer)=20
- #13809(https://github.com/ocaml/ocaml/issues/13809): Distinguish `(module=
M : S)` and `(module M) : (module S)` and=20
change locations of error messages when `S` is ill-typed in `(module S)`=20
(Samuel Vivien, review by Florian Angeletti and Gabriel Scherer)=20
- #13814(https://github.com/ocaml/ocaml/issues/13814), 13898: Add an `unuse=
d-type-declaration` warning when using=20
a `t as 'a` with no other occurences of `'a`=20
(Samuel Vivien, review by Florian Angeletti, Kate Deplaix)=20
- #13818(https://github.com/ocaml/ocaml/issues/13818): better delimited hin=
ts in error message=20
(Florian Angeletti, review by Gabriel Scherer)=20
Internal/compiler-libs changes:=20
-------------------------------=20
- #13539(https://github.com/ocaml/ocaml/issues/13539), #13776(https://githu=
b.com/ocaml/ocaml/issues/13776): Use nanosleep instead of usleep or select,=
if available.=20
(Antonin D=E9cimo, review by Miod Vallat and Gabriel Scherer)=20
- #13748(https://github.com/ocaml/ocaml/issues/13748): Add a .editorconfig =
file for basic editor auto-configuration.=20
(Antonin D=E9cimo, review by Gabriel Scherer and David Allsopp)=20
- #13302(https://github.com/ocaml/ocaml/issues/13302), #14236(https://githu=
b.com/ocaml/ocaml/issues/14236): Store locations of longidents components=
=20
(Ulysse G=E9rard and Jules Aguillon, review by Jules Aguillon=20
and Florian Angeletti)=20
- #13314(https://github.com/ocaml/ocaml/issues/13314): Comment the code of =
Translclass=20
(Vincent Laviron and Nathana=EBlle Courant, review by Olivier Nicole)=20
- #13362(https://github.com/ocaml/ocaml/issues/13362): reimplement Floatarr=
ay.concat in C (`caml_floatarray_concat`),=20
matching the implementation of Array.concat.=20
(Gabriel Scherer, review by Nicol=E1s Ojeda B=E4r)=20
- #13624(https://github.com/ocaml/ocaml/issues/13624): Added location to ex=
ception definitions and type extensions=20
(Samuel Vivien, review by Gabriel Scherer)=20
- #13425(https://github.com/ocaml/ocaml/issues/13425): undocumented -dmatch=
comp flag for the debug=20
output of the pattern-matching compiler=20
(Gabriel Scherer, review by Vincent Laviron and Nicol=E1s Ojeda B=E4r)=20
- #13460(https://github.com/ocaml/ocaml/issues/13460): introduce a variant =
of all predefined types=20
(Gabriel Scherer, review by Ulysse G=E9rard and Florian Angeletti)=20
- #13457(https://github.com/ocaml/ocaml/issues/13457), #13537(https://githu=
b.com/ocaml/ocaml/issues/13537): Annotate alloc/free open/close pairs of fu=
nctions=20
with compiler attributes for static analysis.=20
(Antonin D=E9cimo, review by Gabriel Scherer and Florian Angeletti)=20
- #13464(https://github.com/ocaml/ocaml/issues/13464): Use generic types in=
call to `subtype`. This improves=20
inference of type-directed disambiguation in principal mode.=20
(Richard Eisenberg, review by Jacques Garrigue)=20
- #13606(https://github.com/ocaml/ocaml/issues/13606): Fix Numbers.Int_base=
.compare=20
(Mark Shinwell, review by Vincent Laviron)=20
- #13612(https://github.com/ocaml/ocaml/issues/13612): Refactor `type_appli=
cation`=20
(Ulysse G=E9rard, Leo White, review by Antonin D=E9cimo, Gabriel Scherer,=
=20
Samuel Vivien, Florian Angeletti and Jacques Garrigue)=20
- #13744(https://github.com/ocaml/ocaml/issues/13744): Refactor in `collect=
_apply_args`=20
(Samuel Vivien, review by Florian Angeletti and Gabriel Scherer)=20
- #13787(https://github.com/ocaml/ocaml/issues/13787): a new -dcanonical-id=
s option to show canonicalized identifier stamps=20
in -d{lambda,cmm,...} outputs.=20
(Gabriel Scherer, review by Vincent Laviron and David Allsopp,=20
suggested by David Allsopp)=20
- #13820(https://github.com/ocaml/ocaml/issues/13820): Add a new option -i-=
variance to print the variance of every=20
type parameter; bivariance is printed as `+-`, and for consistency,=20
parser is modified too to accept `+-` and `-+` as `type_variance`.=20
(Takafumi Saikawa and Jacques Garrigue, review by Florian Angeletti)=20
- #13828(https://github.com/ocaml/ocaml/issues/13828): Apply BUILD_PATH_PRE=
FIX_MAP to Sys.argv.(0) before storing it in .cmt=20
and .cmti files.=20
(David Allsopp, review by Daniel B=FCnzli and Gabriel Scherer)=20
- #13848(https://github.com/ocaml/ocaml/issues/13848): Add all paths compon=
ents to the cmt files indexes=20
(Ulysse G=E9rard, review by Florian Angeletti)=20
- #13854(https://github.com/ocaml/ocaml/issues/13854): Make the parser set =
loc_ghost more correctly, for `keyword%extension`=20
syntax=20
(Valentin Gatien-Baron, review by Florian Angeletti)=20
- #13856(https://github.com/ocaml/ocaml/issues/13856): Add a new indirectio=
n in types AST called `package` that stores the=20
content of a `Tpackage` node=20
(Samuel Vivien, review by Florian Angeletti)=20
- #13866(https://github.com/ocaml/ocaml/issues/13866): Modified occurence c=
heck that prevents recursive types for it to see=20
the checked type as a graph rather than a tree=20
(Samuel Vivien, report by Didier Remy, review by Florian Angeletti=20
and Jacques Garrigue)=20
- #13884(https://github.com/ocaml/ocaml/issues/13884) Correctly index modul=
es in constructors and labels paths=20
(Ulysse G=E9rard, review by Florian Angeletti)=20
- #13946(https://github.com/ocaml/ocaml/issues/13946): refactor the #instal=
l_printer code in the debugger and toplevel=20
(Pierre Boutillier, review by Gabriel Scherer and Florian Angeletti)=20
- #13952(https://github.com/ocaml/ocaml/issues/13952): check and document t=
he correctness of `caml_domain_alone ()`.=20
(Gabriel Scherer, review by KC Sivaramakrishnan, report by Olivier Nicole)=
=20
- #13971(https://github.com/ocaml/ocaml/issues/13971): Keep generalized str=
ucture from patterns when typing `let`=20
(Leo White, review by Samuel Vivien and Florian Angeletti)=20
* (*breaking change*) #13972(https://github.com/ocaml/ocaml/issues/13972): =
Renamed the `-no-alias-deps` flag internal representation to=20
`no_alias_deps` instead of `transparent_modules`.=20
(Clement Blaudeau, review by Gabriel Scherer)=20
Build system:=20
-------------=20
* (*breaking change*) #13526(https://github.com/ocaml/ocaml/issues/13526), =
#13789(https://github.com/ocaml/ocaml/issues/13789), #13804(https://github.=
com/ocaml/ocaml/issues/13804): Simplify the build of cross compilers=20
This replaces the configure `--with-target-bindir` option by an equivalent=
=20
`TARGET_BINDIR` variable=20
(Samuel Hym, review by Miod Vallat, Xavier Leroy, Antonin D=E9cimo and S=E9=
bastien=20
Hinderer)=20
- #13431(https://github.com/ocaml/ocaml/issues/13431): Simplify github acti=
on responsible for flagging PRs with=20
the `parsetree-changes` label and extend it to mention the @ppxlib-dev=20
team.=20
(Nathan Rebours, review by Florian Angeletti)=20
- #13494(https://github.com/ocaml/ocaml/issues/13494): Use native symlinks =
on Windows for the OCaml installation, reducing=20
disk usage considerably.=20
(David Allsopp, review by Nicol=E1s Ojeda B=E4r and Gabriel Scherer)=20
- #13789(https://github.com/ocaml/ocaml/issues/13789): Strictly validate th=
e host and target triplets when building for the=20
Windows ports to be *-*-cygwin, *-w64-mingw32* or *-pc-windows. Other Cygwi=
n=20
variants used to be rejected - other MSVC and mingw-w64 variants are now=20
rejected too.=20
(David Allsopp, review by Antonin D=E9cimo and Gabriel Scherer)=20
Bug fixes:=20
----------=20
- #13819(https://github.com/ocaml/ocaml/issues/13819): Fix field initialisa=
tion bug in runtime events subsystem.=20
(Nick Barnes, review by Gabriel Scherer).=20
- #13977(https://github.com/ocaml/ocaml/issues/13977): Pass `-fPIC` when co=
mpiling C files using `ocamlopt`. This was a=20
regression in OCaml 5.3.=20
(Nicol=E1s Ojeda B=E4r, review by Daniel B=FCnzli and Gabriel Scherer)=20
- #13957(https://github.com/ocaml/ocaml/issues/13957): Allow 'effect' as at=
tribute id.=20
(Pieter Goetschalckx, review by Nicol=E1s Ojeda B=E4r and Florian Angeletti=
)=20
- #13691(https://github.com/ocaml/ocaml/issues/13691) #13895(https://github=
.com/ocaml/ocaml/issues/13895): Make four globals underlying Gc.control ato=
mic to avoid C data=20
races against them.=20
(Jan Midtgaard, review by Miod Vallat, Sadiq Jaffer and Antonin D=E9cimo)=
=20
- #13454(https://github.com/ocaml/ocaml/issues/13454): Output a correct tra=
ce of the C_CALLN bytecode.=20
(Miod Vallat, review by Antonin D=E9cimo)=20
- #13595(https://github.com/ocaml/ocaml/issues/13595): Use x19 as Canonical=
Frame Address (CFA) register. This would cause=20
backtraces to be truncated when calling no alloc C code.=20
(Tim McGilchrist, report by Nick Barnes, review by Nick Barnes)=20
* (*breaking change*) #13605(https://github.com/ocaml/ocaml/issues/13605): =
Fix ungenerated constraints when they where impossible due to polyvars=20
issues=20
(Samuel Vivien, review by Florian Angeletti, Richard Eisenberg=20
and Jacques Garrigue)=20
- #13677(https://github.com/ocaml/ocaml/issues/13677), #13679(https://githu=
b.com/ocaml/ocaml/issues/13679): domain.c: remove backup_thread_running to =
simplify=20
concurrent state updates to the backup thread status.=20
(Gabriel Scherer, review by Jan Midtgaard and Miod Vallat,=20
report by Jan Midtgaard)=20
- #13896(https://github.com/ocaml/ocaml/issues/13896), #14098(https://githu=
b.com/ocaml/ocaml/issues/14098): ocamldoc, do not wrap module description i=
n a paragraph tag=20
inside the table of modules=20
(Florian Angeletti, report by John Whitington, review by Gabriel Scherer)=
=20
- #13703(https://github.com/ocaml/ocaml/issues/13703): wrong explanation fo=
r some polymorphic-variant subtyping errors=20
(Gabriel Scherer, review by Jacques Garrigue,=20
report by Wiktor Kuchta and Richard Eisenberg)=20
- #13710(https://github.com/ocaml/ocaml/issues/13710): Support unicode iden=
tifiers in comments.=20
(Pieter Goetschalckx, review by Florian Angeletti and Gabriel Scherer)=20
- #13763(https://github.com/ocaml/ocaml/issues/13763): Track type of variab=
les bound by as-patterns=20
(Leo White, review by Gabriel Scherer, port by Vincent Laviron)=20
- #13778(https://github.com/ocaml/ocaml/issues/13778), #13811(https://githu=
b.com/ocaml/ocaml/issues/13811): do not warn for unused type declarations w=
hen the type is used=20
in a first-class module type (`module S with type t =3D int)`.=20
(Florian Angeletti, report by Nicol=E1s Ojeda B=E4r, review by Gabriel Sche=
rer)=20
- #13790(https://github.com/ocaml/ocaml/issues/13790): Fix bytecode-only bu=
ild of Cygwin when flexlink is being bootstrapped=20
with the compiler.=20
(David Allsopp, review by Antonin D=E9cimo and Miod Vallat)=20
- #13812(https://github.com/ocaml/ocaml/issues/13812): Add forgotten check =
about the validity of the type variable name on=20
the right-hand side of `_ as _`.=20
(Samuel Vivien, review by Gabriel Scherer)=20
- #13845(https://github.com/ocaml/ocaml/issues/13845): Fix bug in untypeast=
/pprintast for value bindings with polymorphic=20
type annotations.=20
(Chris Casinghino, review by Florian Angeletti and Gabriel Scherer)=20
- #13930(https://github.com/ocaml/ocaml/issues/13930), #13933(https://githu=
b.com/ocaml/ocaml/issues/13933): Fix bugs in recursive values definitions i=
nvolving=20
lazy values that have already been evaluated.=20
(Gabriel Scherer, review by Vincent Laviron, report by Vincent Laviron)=20
- #13867(https://github.com/ocaml/ocaml/issues/13867): Fix bug with some re=
cursive bindings of lazy values.=20
(Guillaume Bury and Vincent Laviron, review by Stefan Muenzel=20
and Gabriel Scherer)=20
- #13931(https://github.com/ocaml/ocaml/issues/13931): fix bugs in nested r=
ecursive value definitions.=20
(Gabriel Scherer, review by Vincent Laviron,=20
report by Vincent Laviron)=20
- #13875(https://github.com/ocaml/ocaml/issues/13875), #13878(https://githu=
b.com/ocaml/ocaml/issues/13878): Add dedicated constructor for mutable vari=
able access in=20
Cmm to prevent bugs linked to incorrect handling of coeffects.=20
(Vincent Laviron, review by Gabriel Scherer)=20
- #13880(https://github.com/ocaml/ocaml/issues/13880): Make object stat cou=
nters atomic=20
(Dimitris Mostrous, review by Gabriel Scherer and Nicol=E1s Ojeda B=E4r)=20
- #13172(https://github.com/ocaml/ocaml/issues/13172), #13829(https://githu=
b.com/ocaml/ocaml/issues/13829): Fix a missing check of illegal recursive m=
odule-type=20
definitions=20
(Clement Blaudeau, review by Florian Angeletti)=20
- #13541(https://github.com/ocaml/ocaml/issues/13541), #13777(https://githu=
b.com/ocaml/ocaml/issues/13777): Using C++11 `thread_local` causes name-man=
gling=20
issues when linking with flexlink on Cygwin.=20
(Antonin D=E9cimo and David Allsopp, report by Kate Deplaix)=20
* (*breaking change*) #13874(https://github.com/ocaml/ocaml/issues/13874), =
#13882(https://github.com/ocaml/ocaml/issues/13882): Make evaluation order =
consistent for applications when using=20
the non-flambda native compiler=20
(Vincent Laviron, report by Jean-Marie Madiot, review by Gabriel Scherer)=
=20
- #13942(https://github.com/ocaml/ocaml/issues/13942): Fix assertion on emp=
ty array case=20
(Olivier Nicole, review by Gabriel Scherer)=20
- #13950(https://github.com/ocaml/ocaml/issues/13950): Avoid tearing in `Ar=
ray.sub`=20
(Gabriel Scherer and Olivier Nicole, report by Jan Midtgaard, review by=20
Gabriel Scherer)=20
- #13928(https://github.com/ocaml/ocaml/issues/13928), #13944(https://githu=
b.com/ocaml/ocaml/issues/13944): Fix handling of excessively nested unboxed=
types=20
(Vincent Laviron, review by Gabriel Scherer)=20
- #13987(https://github.com/ocaml/ocaml/issues/13987): Remove a spurious TS=
an report in case of benign data race between=20
major GC read and write from the mutator (fixes #13427(https://github.com/o=
caml/ocaml/issues/13427))=20
(Olivier Nicole, report by Thomas Leonard, review by Gabriel Scherer)=20
- #14007(https://github.com/ocaml/ocaml/issues/14007), #14015(https://githu=
b.com/ocaml/ocaml/issues/14015): Fix memory corruption when an exception is=
raised during=20
demarshaling.=20
(Beno=EEt Vaugon, review by David Allsopp and Gabriel Scherer)=20
- #14025(https://github.com/ocaml/ocaml/issues/14025): fix data race betwee=
n compaction and domain termination=20
(Gabriel Scherer, review by Jan Midtgaard,=20
report by Jan Midtgaard)=20
- #13956(https://github.com/ocaml/ocaml/issues/13956) Fix a regression intr=
oduced in #13308(https://github.com/ocaml/ocaml/issues/13308) triggering wr=
ong unused warnings.=20
(Ulysse G=E9rard, review by Florian Angeletti)=20
- #14070(https://github.com/ocaml/ocaml/issues/14070): also point to label =
mismatches in error messages for labelled tuples=20
(Florian Angeletti, review by Gabriel Scherer)=20
- #14088(https://github.com/ocaml/ocaml/issues/14088), #14091(https://githu=
b.com/ocaml/ocaml/issues/14091): fix non-deterministic code generation in=
=20
matching.ml (backport of rescript-lang/rescript#7557(https://github.com/oca=
ml/ocaml/issues/7557))=20
(Christiano Calgano, review by Gabriel Scherer and Vincent Laviron)=20
- #14105(https://github.com/ocaml/ocaml/issues/14105): Fix a loop in Pprint=
ast that could result in a hang when printing=20
constructor `(::)` in isolation.=20
(Ulysse G=E9rard, review by Nicol=E1s Ojeda B=E4r and Florian Angeletti)=20
- #14108(https://github.com/ocaml/ocaml/issues/14108): toplevel, fix a typo=
in directive type mismatch=20
(Florian Angeletti, review by Gabriel Scherer)=20
- #13586(https://github.com/ocaml/ocaml/issues/13586), #14093(https://githu=
b.com/ocaml/ocaml/issues/14093): Fix closing an out_channel during flush=20
(Stephen Dolan, report by Jan Midtgaard, investigation by Nick Roberts,=20
review by Antonin D=E9cimo and Miod Vallat)=20
- #14101(https://github.com/ocaml/ocaml/issues/14101), #14139(https://githu=
b.com/ocaml/ocaml/issues/14139): define atomic helper types inside `caml/mi=
sc.h` to improve=20
header compatibility with C++=20
(Florian Angeletti, report by Kate Deplaix, review by Gabriel Scherer)=20
- #14135(https://github.com/ocaml/ocaml/issues/14135): Fix a rare internal =
typechecker error when combining recursive=20
modules, polymorphic fields or methods, and constrained type parameters.=20
(Florian Angeletti, review by Gabriel Scherer)=20
- #14169(https://github.com/ocaml/ocaml/issues/14169): runtime, fix cache m=
iss within the stack fragments cache=20
(Florian Angeletti, review by Gabriel Scherer)=20
- #14196(https://github.com/ocaml/ocaml/issues/14196), #14197(https://githu=
b.com/ocaml/ocaml/issues/14197): ocamlprof: do not instrument unreachable c=
lauses=20
(Gabriel Scherer, review by Nicol=E1s Ojeda B=E4r, report by Ali Caglayan)=
=20
- #14200(https://github.com/ocaml/ocaml/issues/14200), #14202(https://githu=
b.com/ocaml/ocaml/issues/14202) : bad variance check with private aliases=
=20
(Jacques Garrigue, report and review by Stephen Dolan)=20
- #14061(https://github.com/ocaml/ocaml/issues/14061), #14209(https://githu=
b.com/ocaml/ocaml/issues/14209): fix a memory-ordering bug in Weak.set that=
could=20
result in uninitialized memory seen by Weak.get on another domain.=20
(Damien Doligez, review by Gabriel Scherer)=20
- #14214(https://github.com/ocaml/ocaml/issues/14214), #14221(https://githu=
b.com/ocaml/ocaml/issues/14221): fix a confused error message for module in=
clusions,=20
functor error messages were missing some type equalities potentially leadin=
g=20
to nonsensical "type t is not compatible with type t" submessage=20
(Florian Angeletti, report by Basile Cl=E9ment, review by Gabriel Scherer)=
=20
- #14238(https://github.com/ocaml/ocaml/issues/14238): Fix certain variadic=
macros in misc.h which could trigger C warnings=20
under certain conditions in prerelease versions of OCaml 5.4.=20
(Antonin D=E9cimo, review by Nicol=E1s Ojeda B=E4r)=20
--=_6c69a8ab-c0e1-446d-a994-2dcc8afa4d44
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 12pt; color: #000000"><div><div>Dear Ocaml users,<br><br>We have the p=
leasure of celebrating the birthdays of Camille Saint-Sa=EBns and<br>Karl S=
chwarzschild by announcing the release of OCaml version 5.4.0.<br><br>Some =
of the highlights of OCaml 5.4.0 are:<br><br>* Labelled tuples<br><br> =
; It is now possible to add labels on tuple fields<br><br> let=
( * ) (x,~dx) (y,~dx:dy) =3D<br> x*.y, ~dx:(x *. dy +.=
y *. dx )<br><br> Those labeled tuples are equivalent to SML records=
: they are an ordered and<br> structurally-typed variants of records.=
In particular, this implies that<br> partial pattern matching on tup=
les is only possible for labelled tuples with a<br> known type:<br><b=
r> type t =3D float * dx:float<br> let v (x_and_d=
x:t) =3D let (x, .. ) =3D x_and_dx in x<br><br>* Array literal syntax suppo=
rt for immutable arrays and `floatarray`s<br><br> The array literal s=
yntax is now shared by array-like primitive types,<br> like 'a array,=
floatarray and the new immutable array iarray.<br> For instance, thi=
s code<br><br> let x =3D Float.Array.of_list [0.;1.;2.]<br><br=
> can now be written<br><br> let x : Float.Array.t =3D [=
|0.; 1.; 2.|]<br><br> This syntax is also supported in patterns<br><b=
r> let one =3D match x with<br> &nbs=
p;| [|_;y;_|] -> Some y<br> | _ -> None<br>=
<br> However array indexing still needs to go through user-defined in=
dexing operators<br><br> let (.$()) =3D Float.Array.get<br>&nb=
sp; let (.$()<-) =3D Float.Array.set<br> let () =3D =
x.$(0) <- x.$(1)<br><br>* Immutable arrays<br><br> Along with shar=
ed array literals, OCaml 5.4 adds support for immutable arrays.<br><br>&nbs=
p; let v: int iarray =3D [| 0; 1; 2 |]<br><br> Immutable array=
s are covariant in the type of their elements, it is thus possible to coerc=
e<br> immutable arrays with no costs at runtime:<br><br> =
let i1: _ iarray =3D [|object method m =3D 0 end|]<br> let i2=
=3D ( i1 :> < > iarray)<br><br>* Atomic record fields<br><br>&nbs=
p; It is now possible to mark a field of a record as atomic. Atomic operati=
ons on<br> those fields require to use the new `Atomic.Loc` submodule =
after accessing the<br> location with the `[%atomic.loc ...]` builtin =
extension. For instance,<br><br> type 'a mpsc_list =3D { mutab=
le head:'a list; mutable tail: 'a list [@atomic] }<br><br> let=
rec push t x =3D<br> let before =3D Atomic.Loc.get [%a=
tomic.loc t.tail] in<br> let after =3D x :: before in<b=
r> if not (Atomic.Loc.compare_and_set [%atomic.loc t.ta=
il] before after) then<br> push t x<br><br> =
; Moreover, it is forbidden to pattern match on atomic fields:<br><br> =
; let f { head; tail } =3D tail<br><br>>Error: Atomic fields (her=
e tail) are forbidden in patterns,<br>> as it =
is difficult to reason about when the atomic read<br>> &nbs=
p; will happen during pattern matching: the field may be read<br>>=
zero, one or several times depending on the patt=
erns around it.<br><br> in order to make all reads on those atomic fi=
elds explicit.<br><br>* Four new standard library modules: Pair, Pqueue, Re=
pr, and Iarray<br><br> The standard library has been extended with fo=
ur new modules:<br><br> - Pair: functions for working on pairs<br><br=
> let ones =3D Pair.map_fst succ (0,1)<br><br> - P=
queue: priority queues, generic or not<br><br> module Int_pque=
ue =3D Pqueue.MakeMin(Int)<br> let q =3D Int_pqueue.of_list [4=
;0;5;7]<br> let some_zero =3D Int_pqueue.pop_min q<br><br>&nbs=
p; - Repr: physical and structural equality, comparison function,<br> =
more generically all functions dependent on the memory representati=
on<br> of values.<br><br> let f =3D Repr.phys_equ=
al (ref 0) (ref 0)<br><br> - Iarray: functions on immutable arrays<br=
><br> let a =3D Iarray.init 10 Fun.id<br> let b =
=3D Iarray.map succ a<br><br>* Restored "memory cleanup upon exit" mode<br>=
<br> This mode allows to restart many time the OCaml runtime in C-dri=
ven programs<br> that interact with OCaml libraries. It is also usefu=
l to reduce noise when<br> tracking memory leaks in C code running th=
e OCaml runtime. To get around<br> cancellation issues, the restored =
mode currently assumes that all domains are<br> joined before exiting=
the OCaml runtime.<br><br>* A new section in the reference manual on profi=
ling OCaml programs on Linux and macOS<br><br>A new section in the referenc=
e manual(https://ocaml.org/manual/profil.html) explains<br>how to use OS sp=
ecific profiling tools to profile native OCaml programs.<br><br>* A lot of =
incremental changes:<br><br> - Many runtime and code generation impro=
vements<br> - More than thirty new standard library functions<br>&nbs=
p; - Nearly a dozen improved error messages<br> - Around fifty bug fi=
xes<br><br>Please report any unexpected behaviours on the OCaml issue track=
er at<br><br>- https://github.com/ocaml/ocaml/issues<br><br>and post any qu=
estions or comments you might have on our discussion forums:<br><br>- https=
://discuss.ocaml.org<br><br>The full list of changes can be found in the fu=
ll changelog below.<br><br>Happy hacking,<br>Florian Angeletti for the OCam=
l team.<br><br>Installation Instructions<br>-------------------------------=
<br><br>The base compiler can be installed as an opam switch with the follo=
wing commands:<br><br> opam update<br> opam switc=
h create 5.4.0<br><br>The source code for the release is also directly avai=
lable on:<br><br>- GitHub: https://github.com/ocaml/ocaml/releases/download=
/5.4.0/ocaml-5.4.0.tar.gz<br>- OCaml archives at Inria: https://caml.inria.=
fr/pub/distrib/ocaml-5.4/ocaml-5.4.0.tar.gz<br><br>Fine-Tuned Compiler Conf=
iguration<br>-----------------------------------------------<br><br>If you =
want to tweak the configuration of the compiler, you can switch to the opti=
on variant with:<br><br> opam update<br> opam swi=
tch create <switch_name> ocaml-variants.5.4.0+options <option_list=
><br><br>where `<option_list>` is a space separated list of `ocaml=
-option-*` packages. For instance, for a `flambda` and `no-flat-float-array=
` switch:<br><br> opam switch create 5.4.0+flambda+nffa =
ocaml-variants.5.4.0+options ocaml-option-flambda ocaml-option-no-flat-floa=
t-array<br><br><br>Changelog:<br>----------------<br><br>Language features:=
<br>--------------------------<br><br> - #13097(https://github.com/oc=
aml/ocaml/issues/13097): added immutable arrays (`'a iarray` type, Iarray s=
tdlib module)<br> (Antal Spector-Zabusky and Olivier Nicole, r=
eview by Gabriel Scherer,<br> Jeremy Yallop and Vincent Laviro=
n)<br><br> - #13340(https://github.com/ocaml/ocaml/issues/13340): Arr=
ay literal syntax [| e1; ...; en |] can now be used to<br> den=
ote values of type `'a array` and `'a iarray` and `floatarray`,<br> &=
nbsp; both in expressions and patterns. The compiler disambiguates each<br>=
case by using contextual type information (assuming `'a array=
`<br> by default).<br> (Nicol=E1s Ojeda B=E4r, re=
view by Richard Eisenberg, Jeremy Yallop, Jacques<br> Garrigue=
, and Gabriel Scherer)<br><br> - #13498(https://github.com/ocaml/ocam=
l/issues/13498): Tuple fields are now optionally labeled:<br> =
`(x:42, y:0)` and `let (~x, ~y) =3D ... in ...`.<br> (Ryan Tjo=
a and Chris Casinghino, review by Gabriel Scherer, Chris Casinghino,<br>&nb=
sp; and Leo White)<br><br> - RFCs#39(https://github.com/ocaml/=
ocaml/issues/39), #13404(https://github.com/ocaml/ocaml/issues/13404): atom=
ic record fields<br> `{ ...; mutable readers : int [@at=
omic]; ... }`<br> `Atomic.Loc.fetch_and_add [%atomic.lo=
c data.readers] 1`<br> (Cl=E9ment Allain and Gabriel Scherer, =
review by KC Sivaramakrishnan,<br> Basile Cl=E9ment and =
Olivier Nicole)<br><br> Standard library:<br> -----------------=
--<br><br> * (*breaking change*) #14124(https://github.com/ocaml/ocam=
l/issues/14124): Do not raise Invalid_argument on negative List.{drop,take}=
.<br> (Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s O=
jeda B=E4r)<br><br> - #13696(https://github.com/ocaml/ocaml/issues/13=
696): Add Result.product and Result.Syntax:<br> `let open Resu=
lt.Syntax in let* x =3D ... in ...`<br> (Daniel B=FCnzli, revi=
ew by Gabriel Scherer, Nicol=E1s Ojeda B=E4r)<br><br> - #12871(https:=
//github.com/ocaml/ocaml/issues/12871): Add the Pqueue module to the stdlib=
. It implements priority queues.<br> (Jean-Christophe Filli=E2=
tre, review by Daniel B=FCnzli, L=E9o Andr=E8s and<br> Gabriel=
Scherer)<br><br> - #13760(https://github.com/ocaml/ocaml/issues/1376=
0): Add String.{edit_distance,spellcheck}<br> (Daniel B=FCnzli=
, review by wikku, Nicol=E1s Ojeda B=E4r, Gabriel Scherer and<br> &nb=
sp; Florian Angeletti)<br><br> - #13753(https://github.com/ocam=
l/ocaml/issues/13753), #13755(https://github.com/ocaml/ocaml/issues/13755):=
Add Stdlib.Repr:<br> Repr.phys_equal and Repr.compare are mor=
e explicit than (=3D=3D) and `compare`.<br> (Kate Deplaix, Tho=
mas Blanc and L=E9o Andr=E8s, review by Gabriel Scherer,<br> &=
nbsp;Florian Angeletti, Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli and Jeremy Y=
allop)<br><br> - #13695(https://github.com/ocaml/ocaml/issues/13695):=
Add Stdlib.Char.Ascii<br> (Daniel B=FCnzli, review by by Nico=
l=E1s Ojeda B=E4r and Jeremy Yallop)<br><br><br> - #13720(https://git=
hub.com/ocaml/ocaml/issues/13720): Add Result.{get_ok',error_to_failure}<br=
> (Daniel B=FCnzli, review by wikku, Gabriel Scherer, Nicol=E1s=
Ojeda B=E4r,<br> Vincent Laviron and hirrolot)<br><br> =
- #13885(https://github.com/ocaml/ocaml/issues/13885): Add Dynarray.{exists=
2, for_all2}.<br> (T. Kinsart, review by Daniel B=FCnzli, Gabr=
iel Scherer, and Nicol=E1s Ojeda B=E4r)<br><br> * (*breaking change*)=
#13862(https://github.com/ocaml/ocaml/issues/13862): Make List.sort_uniq k=
eep the first occurrences of duplicates.<br> (Beno=EEt Jubin, =
review by Nicol=E1s Ojeda B=E4r, Gabriel Scherer)<br><br> - #13836(ht=
tps://github.com/ocaml/ocaml/issues/13836): Add [Float.]Array.{equal,compar=
e}.<br> (Daniel B=FCnzli, review by Nicol=E1s Ojeda B=E4r and =
Gabriel Scherer)<br><br> - #13796(https://github.com/ocaml/ocaml/issu=
es/13796): Add Uchar.utf_8_decode_length_of_byte and<br> Uchar=
.max_utf_8_decode_length.<br> (Daniel B=FCnzli, review by Nico=
l=E1s Ojeda B=E4r and Florian Angeletti)<br><br> - #13768(https://git=
hub.com/ocaml/ocaml/issues/13768): Add Either.get_left and Either.get_right=
<br> (T. Kinsart, review by Nicol=E1s Ojeda B=E4r and Florian =
Angeletti)<br><br> * (*breaking change*) #13570(https://github.com/oc=
aml/ocaml/issues/13570), #13794(https://github.com/ocaml/ocaml/issues/13794=
): Format, add an out_width function to Format device for<br> =
approximating unicode width.<br> (Florian Angeletti, rev=
iew by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli,<br> and G=
abriel Scherer)<br><br> - #13731(https://github.com/ocaml/ocaml/issue=
s/13731): Add Either.retract<br> (Daniel B=FCnzli, review by N=
icol=E1s Ojeda B=E4r and David Allsopp)<br><br> - #13729(https://gith=
ub.com/ocaml/ocaml/issues/13729): Add Seq.filteri<br> (T. Kins=
art, review by Nicol=E1s Ojeda B=E4r and Daniel B=FCnzli)<br><br> - #=
13721(https://github.com/ocaml/ocaml/issues/13721): Add Result.retract<br>&=
nbsp; (Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s Ojeda B=
=E4r and<br> David Allsopp)<br><br> - #13310(https=
://github.com/ocaml/ocaml/issues/13310): Add Stdlib.Pair<br> (=
Victoire Noizet, review by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli, Xavier V=
an de<br> Woestyne, Jeremy Yallop and Florian Angeletti)=
<br><br> - #13662(https://github.com/ocaml/ocaml/issues/13662): Add e=
ager boolean operations Bool.logand, Bool.logor, Bool.logxor<br> &nbs=
p; (Jeremy Yallop, review by Nicol=E1s Ojeda B=E4r)<br><br> - #13463(=
https://github.com/ocaml/ocaml/issues/13463), #13572(https://github.com/oca=
ml/ocaml/issues/13572): Avoid raising Queue.empty in Format when it is used=
<br> concurrently, raise a specific exception instead.<br>&nbs=
p; (Chritophe Raffalli, review by Gabriel Scherer and Daniel B=FCnzl=
i)<br><br> - #13620(https://github.com/ocaml/ocaml/issues/13620): Avo=
id copying the string in String.concat, String.sub and<br> Str=
ing.split_on_char when the full string is returned.<br> (Chris=
tophe Raffalli, review by Nicol=E1s Ojeda B=E4r and Gabriel Scherer and<br>=
Hugo Heuzard)<br><br> - #13727(https://github.com=
/ocaml/ocaml/issues/13727): Reimplement Sys.getenv_opt not to use exception=
s internally, meaning<br> that the current backtrace is preser=
ved when Sys.getenv_opt returns None.<br> (David Allsopp, revi=
ew by Nicol=E1s Ojeda B=E4r, Josh Berdine and Gabriel Scherer)<br><br> =
; - #13737(https://github.com/ocaml/ocaml/issues/13737): Avoid closure allo=
cations in Weak.Make.add when resizing the<br> table<br> =
(Vincent Laviron, review by Gabriel Scherer and Daniel B=FCnzli)<br=
><br> - #13740(https://github.com/ocaml/ocaml/issues/13740): Improve =
performance of Weak.find_aux<br> (Josh Berdine, review by Gabr=
iel Scherer)<br><br> - #13782(https://github.com/ocaml/ocaml/issues/1=
3782): Improve performance and type safety of Type.Id by using<br> &n=
bsp; [%extension_constructor] instead of Obj.Extension_constructor.of_val.<=
br> (Basile Cl=E9ment, review by Vincent Laviron and Nicol=E1s=
Ojeda B=E4r)<br><br> - #13589(https://github.com/ocaml/ocaml/issues/=
13589): Expose Sys.io_buffer_size, the size of internal buffers used by the=
<br> runtime system and the `unix` library.<br> (=
Yves Ndiaye and Nicol=E1s Ojeda B=E4r, review by Daniel B=FCnzli and Nicol=
=E1s Ojeda<br> B=E4r)<br><br> - #13569(https://github.co=
m/ocaml/ocaml/issues/13569): add a `Format.format_text` which adds break hi=
nts to format literals.<br> (Florian Angeletti, review by Nico=
l=E1s Ojeda B=E4r, Daniel B=FCnzli,<br> and Gabriel Sche=
rer)<br><br> - #13578(https://github.com/ocaml/ocaml/issues/13578): O=
n Windows, use the OS CSPRNG to seed the Stdlib.Random generator.<br> =
(Antonin D=E9cimo, review by Miod Vallat, Nicol=E1s Ojeda B=E4r, an=
d Xavier Leroy)<br><br> - #13859(https://github.com/ocaml/ocaml/issue=
s/13859): Fix Weak.get_copy not darkening custom blocks<br> (J=
osh Berdine, review by Stephen Dolan)<br><br> - #13909(https://github=
.com/ocaml/ocaml/issues/13909): Add `Dynarray.unsafe_to_iarray`<br> &=
nbsp; (Olivier Nicole, review by Daniel B=FCnzli, Stefan Muenzel and Gabrie=
l Scherer,<br> request by Daniel B=FCnzli)<br><br> - #13=
932(https://github.com/ocaml/ocaml/issues/13932): Add List.singleton and Se=
q.singleton<br> (David Allsopp, tariffs applied by Nicol=E1s O=
jeda B=E4r and Gabriel Scherer)<br><br> * (*breaking change*) #13843(=
https://github.com/ocaml/ocaml/issues/13843): Add signal definitions for SI=
GIO and SIGWINCH. Introduces a<br> type alias for signal int, =
signal_to_string to convert OCaml signal numbers<br> to their =
POSIX equivalent names, and signal_of_int/signal_to_int for<br>  =
; converting between OCaml and platform signal numbers. (Reported in #13825=
(https://github.com/ocaml/ocaml/issues/13825))<br> (Tim McGilc=
hrist, review by David Allsopp, Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli<br>&=
nbsp; Jan Midtgaard and Miod Vallat)<br><br> Runtime sys=
tem:<br> -----------------------<br><br> - #13500(https://githu=
b.com/ocaml/ocaml/issues/13500): Add frame pointers support for ARM64 on Li=
nux and macOS.<br> (Tim McGilchrist, review by KC Sivaramakris=
hnan, Fabrice Buoro<br> and Miod Vallat)<br><br> -=
#12964(https://github.com/ocaml/ocaml/issues/12964): Reintroduce "memory c=
leanup upon exit" mode. The cleanup will<br> however be incomp=
lete if not all domains have been joined when the main<br> dom=
ain terminates.<br> (Miod Vallat, review by KC Sivaramakrishna=
n, feedback from Nick Barnes<br> and Gabriel Scherer)<br=
><br> - #13582(https://github.com/ocaml/ocaml/issues/13582): Enable s=
oftware prefetching support for ARM64, s390x, PPC64 and RiscV.<br> &n=
bsp; Used during GC marking and sweeping to speed up both operations by<br>=
prefetching data.<br> (Tim McGilchrist, review b=
y Nick Barnes, Antonin D=E9cimo,<br> Stephen Dolan and M=
iod Vallat)<br><br><br> - #13675(https://github.com/ocaml/ocaml/issue=
s/13675): Make Unix.map_file memory show up in Gc.Memprof.<br> =
(Stephen Dolan, review by Guillaume Munch-Maccagnoni and Gabriel Scherer)<=
br><br> - #13785(https://github.com/ocaml/ocaml/issues/13785): Add `R=
untime_events.Timestamp.get_current`.<br> (Simon Cruanes)<br><=
br> - #13774(https://github.com/ocaml/ocaml/issues/13774): Fix for in=
accurate live blocks/words stats in compaction.<br> (Sadiq Jaf=
fer, report by KC Sivaramakrishnan and Jan Midtgaard, review by<br> &=
nbsp; Gabriel Scherer)<br><br> - #13773(https://github.com/ocaml/ocam=
l/issues/13773): Ensure that shared pool owners are correctly set on pool a=
doption.<br> (Stephen Dolan, review by Sadiq Jaffer and Gabrie=
l Scherer)<br><br> * (*breaking change*) #11449(https://github.com/oc=
aml/ocaml/issues/11449), #13497(https://github.com/ocaml/ocaml/issues/13497=
): Add caml_stat_char_array_{to,of}_os functions allowing<br> =
conversion of string data which may contain NUL characters. Correct<br>&nbs=
p; implementation of caml_stat_strdup_to_utf16 to raise Out_of_memor=
y instead of<br> returning of NULL (the behaviour of caml_stat=
_strdup_to_os was inconsistent<br> between Unix/Windows).<br>&=
nbsp; (David Allsopp, review by Nick Barnes, Antonin D=E9cimo and Mi=
od Vallat)<br><br> - #13352(https://github.com/ocaml/ocaml/issues/133=
52): Concurrency refactors and cleanups.<br> (Antonin D=E9cimo=
, review by Gabriel Scherer, David Allsopp, and Miod Vallat)<br><br> =
- #13437(https://github.com/ocaml/ocaml/issues/13437): Stop using GetProcAd=
dress to load functions that were not<br> available in older, =
now unsupported Windows versions.<br> (Antonin D=E9cimo, revie=
w by Nicol=E1s Ojeda B=E4r and David Allsopp)<br><br> - #13470(https:=
//github.com/ocaml/ocaml/issues/13470): Constify some function parameters, =
flags tables, and some<br> pointers in C code (take 3).<br>&nb=
sp; (Antonin D=E9cimo, review by Stephen Dolan and Miod Vallat)<br><=
br> - #13492(https://github.com/ocaml/ocaml/issues/13492): Parse the =
CAML_LD_LIBRARY_PATH environment variable for the<br> shared_l=
ibs_path item in `ocamlrun -config` in addition to displaying the<br> =
entries found in ld.conf.<br> (David Allsopp, review b=
y Stephen Dolan)<br><br> - #13496(https://github.com/ocaml/ocaml/issu=
es/13496): Add missing .type and .size directives to main frametable to sil=
ence<br> warnings from the linker when using libasmrun_shared =
on amd64 and power. The<br> other backends already carried the=
se directives.<br> (David Allsopp, review by Tim McGilchrist a=
nd Miod Vallat)<br><br> - #13354(https://github.com/ocaml/ocaml/issue=
s/13354): Use C99 flexible array member syntax everywhere.<br> =
(Antonin D=E9cimo, review by Miod Vallat, Gabriel Scherer, and Xavier Lero=
y)<br><br> - #11865(https://github.com/ocaml/ocaml/issues/11865), #13=
584(https://github.com/ocaml/ocaml/issues/13584): Fix a deadlock triggered =
by deleting C roots from C finalisers<br> (Stephen Dolan, repo=
rt by Timothy Bourke, review by Mark Shinwell and Damien<br> D=
oligez)<br><br> - #13613(https://github.com/ocaml/ocaml/issues/13613)=
: Functions from caml/skiplist.h and caml/lf_skiplist.h no longer raise<br>=
Out_of_memory exceptions that the runtime could not handle.<b=
r> (Guillaume Munch-Maccagnoni, review by Stephen Dolan)<br><b=
r> - #13575(https://github.com/ocaml/ocaml/issues/13575), #13635(http=
s://github.com/ocaml/ocaml/issues/13635): Maintain OCaml frame pointers cor=
rectly even when using<br> C libraries that do not suppo=
rt them.<br> (Stephen Dolan and David Allsopp, report by Thoma=
s Leonard, review by Tim<br> McGilchrist and Fabrice Buo=
ro)<br><br> - #13643(https://github.com/ocaml/ocaml/issues/13643): Al=
low values reachable from ephemeron keys to be collected by minor GC<br>&nb=
sp; (Stephen Dolan, review by Fran=E7ois Bobot)<br><br> - #137=
01(https://github.com/ocaml/ocaml/issues/13701): optimize `caml_continuatio=
n_use` based on #12735(https://github.com/ocaml/ocaml/issues/12735)<br>&nbs=
p; (Hugo Heuzard, review by KC Sivaramakrishnan)<br><br> - #13=
227(https://github.com/ocaml/ocaml/issues/13227), #13714(https://github.com=
/ocaml/ocaml/issues/13714): Review of locking in the multicore runtime. Fix=
<br> deadlocks in runtime events and potential deadlocks with =
named<br> values.<br> (Guillaume Munch-Maccagnoni=
, review by Gabriel Scherer, tests by<br> Jan Midtgaard)<br><b=
r> - #13736(https://github.com/ocaml/ocaml/issues/13736): Fix major G=
C pacing bug triggered by synchronous collections.<br> (Nick B=
arnes, review by Damien Doligez and Tim McGilchrist)<br><br> - #13827=
(https://github.com/ocaml/ocaml/issues/13827): Avoid re-marking ephemerons =
with trivial data.<br> (Stephen Dolan, review by Nick Barnes a=
nd Josh Berdine, benchmarking by<br> Nicol=E1s Ojeda B=
=E4r)<br><br> - #13300(https://github.com/ocaml/ocaml/issues/13300), =
#13861(https://github.com/ocaml/ocaml/issues/13861): introduce `Gc.ramp_up`=
to explicitly mark ramp-up<br> phases of memory consumption a=
nd avoid GC overwork. Ramp-up behaviors<br> are worse with OCa=
ml 5 than with OCaml 4 due to higher sensitivity<br> to excess=
ive pacing computations. Indicating ramp-up explicitly eliminates<br> =
the main known slowdown of OCaml 5 (relative to OCaml 4) for Coq/Ro=
cq.<br> (Gabriel Scherer, review by Damien Doligez and Guillau=
me Munch-Maccagnoni,<br> report by Emilio Jes=FAs Galleg=
o Arias and Olivier Nicole)<br><br> - #14057(https://github.com/ocaml=
/ocaml/issues/14057): Don't update memprof too early at the end of a minor =
GC.<br> (Nick Barnes, review by Damien Doligez).<br><br> =
Code generation and optimizations:<br> -----------------------------=
------------------<br><br> - #13262(https://github.com/ocaml/ocaml/is=
sues/13262), #14074(https://github.com/ocaml/ocaml/issues/14074): fix perfo=
rmance issue on Apple Silicon macOS by emitting<br> `stlr` ins=
tead of `dmb ishld; str`.<br> (KC Sivaramakrishnan, report by =
Fran=E7ois Pottier, analysis by Fr=E9d=E9ric Bour,<br> Xavier =
Leroy, Miod Vallat, Gabriel Scherer and Stephen Dolan, review by Miod<br>&n=
bsp; Vallat, Vincent Laviron and Xavier Leroy)<br><br> * (*bre=
aking change*) #13050(https://github.com/ocaml/ocaml/issues/13050), #14104(=
https://github.com/ocaml/ocaml/issues/14104), #14143(https://github.com/oca=
ml/ocaml/issues/14143): Use '$' instead of '.' to separate module names<br>=
in symbol names on macOS and Windows (including the Cygwin ba=
ckend).<br> This changes mangling of OCaml identifiers on thos=
e operating systems from<br> `camlModule.name_NNN` to `camlMod=
ule$name_NNN`. Additionally it<br> changes the encoding of spe=
cial characters from $xx (two hex digits)<br> to $$xx (two dol=
lar signs followed by two hex digits).<br> (Tim McGilchrist, w=
ith contributions from Xavier Leroy,<br> reviewed by Xav=
ier Leroy, Miod Vallat, Gabriel Scherer,<br> Nick Barnes=
and Hugo Heuzard)<br><br> - #13807(https://github.com/ocaml/ocaml/is=
sues/13807): Allow unaligned memory accesses on ARM64.<br> (Ma=
tthew Else, review by Xavier Leroy)<br><br><br> - #13565(https://gith=
ub.com/ocaml/ocaml/issues/13565): less tagging in switches compiled to affi=
ne transformations<br> by ocamlopt.<br> (Gabriel =
Scherer and Cl=E9ment Allain, review by Vincent Laviron,<br> &=
nbsp;report by Vesa Karvonen)<br><br> - #13672(https://github.com/oca=
ml/ocaml/issues/13672) Avoid register stall on conversion instructions on a=
md64.<br> (Pierre Chambart, review by Gabriel Scherer and Xavi=
er Leroy,<br> report by Patrick Nicodemus)<br><br> =
- #13667(https://github.com/ocaml/ocaml/issues/13667): (originally #11162(=
https://github.com/ocaml/ocaml/issues/11162)) Fix instr_size computation on=
arm64.<br> (Stephen Dolan and Tim McGilchrist, review by Xavi=
er Leroy<br> and David Allsopp)<br><br> - #13758(https:/=
/github.com/ocaml/ocaml/issues/13758): Propagate more value kinds in Flambd=
a to allow more unboxing<br> (Vincent Laviron, review by Pierr=
e Chambart)<br><br> - #13759(https://github.com/ocaml/ocaml/issues/13=
759): Propagate more type information from clambda to cmm.<br> =
(Pierre Chambart, review by Gabriel Scherer)<br><br> - #13735(https:=
//github.com/ocaml/ocaml/issues/13735): Follow the behaviour of the C compi=
ler to decide whether to emit the<br> `.size` and `.type` dire=
ctives and the `.note.GNU-stack` section<br> (Samuel Hym, revi=
ew by Miod Vallat, Antonin D=E9cimo and Gabriel Scherer)<br><br> Othe=
r libraries:<br> --------------------<br><br> * (*breaking chan=
ge*) #13435(https://github.com/ocaml/ocaml/issues/13435): On Windows, use s=
ystem calls for `Filename.get_temp_dir_name` instead<br> of di=
rectly reading the environment, which in particular improves the security<b=
r> of OCaml processes running in the SYSTEM security context b=
y mitigating<br> privileged file operation attacks. For all ot=
her processes running with the<br> default environment (where =
`TEMP` is set), there is no discernible change.<br> (Antonin D=
=E9cimo, review by Nicol=E1s Ojeda B=E4r and David Allsopp)<br><br> -=
#13504(https://github.com/ocaml/ocaml/issues/13504), #13625(https://github=
.com/ocaml/ocaml/issues/13625), #14223(https://github.com/ocaml/ocaml/issue=
s/14223): Add `Thread.set_current_thread_name`.<br> (Romain Be=
auxis, review by Gabriel Scherer and Antonin D=E9cimo)<br><br> * (*br=
eaking change*) #13376(https://github.com/ocaml/ocaml/issues/13376): Allow =
Dynlink.loadfile_private to load bytecode libraries with<br> i=
nternal dependencies<br> (Vincent Laviron, report by St=E9phan=
e Glondu, review by Nicol=E1s Ojeda B=E4r<br> and Xavier=
Leroy)<br><br> - #13429(https://github.com/ocaml/ocaml/issues/13429)=
: add `Unix.sigwait`, a binding to the `sigwait` system call;<br> &nb=
sp; implement `Thread.wait_signal` using `Unix.sigwait`, and<br> &nbs=
p; `Thread.sigmask` using `Unix.sigprocmask`.<br> (Xavier Lero=
y, review by Antonin D=E9cimo, Gabriel Scherer, Miod Vallat)<br><br> =
- #13442(https://github.com/ocaml/ocaml/issues/13442), #13452(https://githu=
b.com/ocaml/ocaml/issues/13452): Fix Unix.getgroups for users belonging to =
more than 32 groups<br> when using musl<br> (Kate=
Deplaix, review by Gabriel Scherer, Antonin D=E9cimo, Anil Madhavapeddy)<b=
r><br> - #13576(https://github.com/ocaml/ocaml/issues/13576): Introdu=
ce internal helpers to convert between time representations.<br> &nbs=
p; On Windows, prevent erroneously waiting for an unbounded time in Unix.se=
lect<br> if more than 64 file descriptors per lists are watche=
d, or if watching<br> non-socket file descriptors, and a timeo=
ut longer than $2^{32}$ milliseconds<br> is used. Cap the time=
out to $2^{32}$ milliseconds.<br> (Antonin D=E9cimo, review by=
Gabriel Scherer and Miod Vallat)<br><br> - #13921(https://github.com=
/ocaml/ocaml/issues/13921): Set cloexec correctly on CRT file descriptors c=
reated by the Unix<br> library on Windows. The inheritance on =
the underlying Win32 handles was<br> correctly set, but the bo=
ok-keeping for the CRT was leaking the value of<br> non-inheri=
ted handles which combined with re-use of HANDLE values within<br> &n=
bsp; processes could appear to make a CRT file descriptor "re-open".<br>&nb=
sp; (David Allsopp, review by Nicol=E1s Ojeda B=E4r)<br><br> T=
ools:<br> -------<br><br> - #13686(https://github.com/ocaml/oca=
ml/issues/13686): Fix Python debugger extensions (for LLDB and GDB) to rest=
ore<br> functionality broken by #13272(https://github.com/ocam=
l/ocaml/issues/13272) in 5.3.<br> (Nick Barnes, review by Tim =
McGilchrist Gabriel Scherer)<br><br> - #12019(https://github.com/ocam=
l/ocaml/issues/12019): ocamlc: add `align_double` and `align_int64` to `oca=
mlc -config`<br> output.<br> (Romain Beauxis, rev=
iew by David Allsopp)<br><br> - #12642(https://github.com/ocaml/ocaml=
/issues/12642), #13536(https://github.com/ocaml/ocaml/issues/13536), #14184=
(https://github.com/ocaml/ocaml/issues/14184), #14192(https://github.com/oc=
aml/ocaml/issues/14192): in the toplevel, print shorter paths for<br> =
constructors and labels when only some modules along their path are=
open.<br> (Gabriel Scherer, review by Florian Angeletti)<br><=
br> - #13199(https://github.com/ocaml/ocaml/issues/13199), #13485(htt=
ps://github.com/ocaml/ocaml/issues/13485), #13665(https://github.com/ocaml/=
ocaml/issues/13665), #13762(https://github.com/ocaml/ocaml/issues/13762), #=
13965(https://github.com/ocaml/ocaml/issues/13965): Support running native =
debuggers in<br> ocamltest.<br> (Tim McGilchrist,=
Sebastien Hinderer, David Allsopp, Antonin D=E9cimo, review by<br> &=
nbsp; Sebastien Hinderer, Gabriel Scherer, Antonin D=E9cimo, and Tim McGilc=
hrist)<br><br> - #13764(https://github.com/ocaml/ocaml/issues/13764),=
#13779(https://github.com/ocaml/ocaml/issues/13779): add missing "-keyword=
s" flag to ocamldep and ocamlprof<br> (Florian Angeletti, repo=
rt by Prashanth Mundkur, review by Gabriel Scherer)<br><br> - #13877(=
https://github.com/ocaml/ocaml/issues/13877): ocamldoc, add a `-latex-escap=
e-underscore` flag to control the<br> escaping of `_` undersco=
re in latex references (in order to be able to match<br> odoc =
behaviour).<br> (Florian Angeletti, review by Gabriel Scherer)=
<br><br> - #13906(https://github.com/ocaml/ocaml/issues/13906): Add s=
upport for a `multicore` tag in ocamltest and use it for<br> t=
ests that fail on mono-core systems.<br> (St=E9phane Glondu, r=
eview by Nicol=E1s Ojeda B=E4r)<br><br> Manual and documentation:<br>=
-------------------------<br><br> - #13751(https://github.com/=
ocaml/ocaml/issues/13751): Document support for profiling with Linux perf a=
nd frame pointers.<br> (Tim McGilchrist, review by Gabriel Sch=
erer and Miod Vallat)<br><br> - #12452(https://github.com/ocaml/ocaml=
/issues/12452): Add examples to Stdlib.Fun documentation.<br> =
(Hazem ElMasry, review by Florian Angeletti and Gabriel Scherer)<br><br>&nb=
sp; - #13924(https://github.com/ocaml/ocaml/issues/13924): Document how to =
put [@deprecated] on let bindings, constructors, etc<br> in th=
e manual<br> (Valentin Gatien-Baron, review by Florian Angelet=
ti)<br><br><br> - #13694(https://github.com/ocaml/ocaml/issues/13694)=
: Fix name for caml_hash_variant in the C interface.<br> (Mich=
ael Hendricks)<br><br> - #13732(https://github.com/ocaml/ocaml/issues=
/13732): Document that custom finalizers must not access the OCaml heap, et=
c.<br> (Josh Berdine, review by Stephen Dolan and Guillaume Mu=
nch-Maccagnoni)<br><br> Type system:<br> ------------<br><br>&n=
bsp; * (*breaking change*) #13830(https://github.com/ocaml/ocaml/issues/138=
30): fail rather than silently create abstract module types when avoiding<b=
r> (i.e. hiding) signature items, as in:<br> ```o=
caml<br> module N =3D struct<br> &n=
bsp; open (struct type t =3D A | B end)<br> modu=
le type T =3D sig type u =3D t * int end<br> end<br>&nb=
sp; ```<br> Before, it was succeeding with `module N : =
sig module type T end`, now it<br> fails. Similarly for anonym=
ous functor calls (of the form `F(struct ... end))<br> (Clemen=
t Blaudeau, review by Gabriel Scherer)<br><br> Compiler user-interfac=
e and warnings:<br> -------------------------------------<br><br>&nbs=
p; - #13817(https://github.com/ocaml/ocaml/issues/13817): align spellchecki=
ng hints with the possibly misspelled identifier/<br> &=
nbsp; Error: Unbound type constructor "aray"<br=
> Hint: =
Did you mean "array"?<br> =
(Florian Angeletti, suggestion by Daniel B=FCnzli, review by Gabriel Schere=
r)<br><br> - #13587(https://github.com/ocaml/ocaml/issues/13587): Ena=
ble native backend on x86_64 GNU/Hurd.<br> (Samuel Thibault, r=
eview by Antonin D=E9cimo, S=E9bastien Hinderer and Miod<br> &=
nbsp;Vallat)<br><br> - #13663(https://github.com/ocaml/ocaml/issues/1=
3663): Improve the error message when GADT parameter variance cannot be<br>=
checked.<br> (Stefan Muenzel, review by Gabriel =
Scherer and Florian Angeletti)<br><br> - #13646(https://github.com/oc=
aml/ocaml/issues/13646): Improve the error messages when a recursive module=
type<br> references another recursive module type.<br> =
(Stefan Muenzel, review by Florian Angeletti and Gabriel Scherer)<br=
><br> - #13702(https://github.com/ocaml/ocaml/issues/13702), #13865(h=
ttps://github.com/ocaml/ocaml/issues/13865): Specialized error messages for=
functors appearing in contexts<br> where non-functors were ex=
pected `module A: sig ... end =3D Set.Make`<br> (and the rever=
se)<br> (Florian Angeletti, report by Jeremy Yallop, review by=
Gabriel Scherer)<br><br> - #13788(https://github.com/ocaml/ocaml/iss=
ues/13788), #13813(https://github.com/ocaml/ocaml/issues/13813): Keep the m=
odule context in spellchecking hints.<br> `Fun.protact` now pr=
ompts `Did you mean "Fun.protect?"` rather than<br> `Did you m=
ean "protect?"`.<br> (Florian Angeletti, suggestion by Daniel =
B=FCnzli, review by Gabriel Scherer)<br><br><br> - #13428(https://git=
hub.com/ocaml/ocaml/issues/13428): support dump=3D[source | parsetree | lam=
bda | ... | cmm | ...]<br> in OCAMLRUNPARAM<br> (=
Gabriel Scherer, review by Vincent Laviron)<br><br> - #13493(https://=
github.com/ocaml/ocaml/issues/13493): Clearer error message in ocamlc for c=
onflicting link options for<br> C stubs when shared libraries =
are not available.<br> (David Allsopp, review by Gabriel Scher=
er)<br><br> - #13563(https://github.com/ocaml/ocaml/issues/13563), li=
ghter inline code styling for output without bold support: inline<br> =
code is no longer printed as "..." to avoid confusion with OCaml st=
rings.<br> (Florian Angeletti, review by Richard Eisenberg)<br=
><br> - #13568(https://github.com/ocaml/ocaml/issues/13568), composab=
le formatting for warning and alert messages<br> (Florian Ange=
letti, review by Richard Eisenberg)<br><br> - #13601(https://github.c=
om/ocaml/ocaml/issues/13601): Enable natdynlink on x86_64 GNU/Hurd<br> =
; (Samuel Thibault, review by S=E9bastien Hinderer)<br><br> - =
#13809(https://github.com/ocaml/ocaml/issues/13809): Distinguish `(module M=
: S)` and `(module M) : (module S)` and<br> change locations =
of error messages when `S` is ill-typed in `(module S)`<br> (S=
amuel Vivien, review by Florian Angeletti and Gabriel Scherer)<br><br> =
; - #13814(https://github.com/ocaml/ocaml/issues/13814), 13898: Add an `unu=
sed-type-declaration` warning when using<br> a `t as 'a` with =
no other occurences of `'a`<br> (Samuel Vivien, review by Flor=
ian Angeletti, Kate Deplaix)<br><br> - #13818(https://github.com/ocam=
l/ocaml/issues/13818): better delimited hints in error message<br> &n=
bsp; (Florian Angeletti, review by Gabriel Scherer)<br><br> Internal/=
compiler-libs changes:<br> -------------------------------<br><br>&nb=
sp; - #13539(https://github.com/ocaml/ocaml/issues/13539), #13776(https://g=
ithub.com/ocaml/ocaml/issues/13776): Use nanosleep instead of usleep or sel=
ect, if available.<br> (Antonin D=E9cimo, review by Miod Valla=
t and Gabriel Scherer)<br><br> - #13748(https://github.com/ocaml/ocam=
l/issues/13748): Add a .editorconfig file for basic editor auto-configurati=
on.<br> (Antonin D=E9cimo, review by Gabriel Scherer and David=
Allsopp)<br><br> - #13302(https://github.com/ocaml/ocaml/issues/1330=
2), #14236(https://github.com/ocaml/ocaml/issues/14236): Store locations of=
longidents components<br> (Ulysse G=E9rard and Jules Aguillon=
, review by Jules Aguillon<br> and Florian Angeletti)<br=
><br><br> - #13314(https://github.com/ocaml/ocaml/issues/13314): Comm=
ent the code of Translclass<br> (Vincent Laviron and Nathana=
=EBlle Courant, review by Olivier Nicole)<br><br> - #13362(https://gi=
thub.com/ocaml/ocaml/issues/13362): reimplement Floatarray.concat in C (`ca=
ml_floatarray_concat`),<br> matching the implementation of Arr=
ay.concat.<br> (Gabriel Scherer, review by Nicol=E1s Ojeda B=
=E4r)<br><br> - #13624(https://github.com/ocaml/ocaml/issues/13624): =
Added location to exception definitions and type extensions<br>  =
; (Samuel Vivien, review by Gabriel Scherer)<br><br> - #13425(https:/=
/github.com/ocaml/ocaml/issues/13425): undocumented -dmatchcomp flag for th=
e debug<br> output of the pattern-matching compiler<br> =
(Gabriel Scherer, review by Vincent Laviron and Nicol=E1s Ojeda B=E4=
r)<br><br> - #13460(https://github.com/ocaml/ocaml/issues/13460): int=
roduce a variant of all predefined types<br> (Gabriel Scherer,=
review by Ulysse G=E9rard and Florian Angeletti)<br><br> - #13457(ht=
tps://github.com/ocaml/ocaml/issues/13457), #13537(https://github.com/ocaml=
/ocaml/issues/13537): Annotate alloc/free open/close pairs of functions<br>=
with compiler attributes for static analysis.<br>  =
; (Antonin D=E9cimo, review by Gabriel Scherer and Florian Angeletti)<br><b=
r> - #13464(https://github.com/ocaml/ocaml/issues/13464): Use generic=
types in call to `subtype`. This improves<br> inference of ty=
pe-directed disambiguation in principal mode.<br> (Richard Eis=
enberg, review by Jacques Garrigue)<br><br> - #13606(https://github.c=
om/ocaml/ocaml/issues/13606): Fix Numbers.Int_base.compare<br> =
(Mark Shinwell, review by Vincent Laviron)<br><br> - #13612(https://=
github.com/ocaml/ocaml/issues/13612): Refactor `type_application`<br> =
(Ulysse G=E9rard, Leo White, review by Antonin D=E9cimo, Gabriel Sc=
herer,<br> Samuel Vivien, Florian Angeletti and Jacques =
Garrigue)<br><br> - #13744(https://github.com/ocaml/ocaml/issues/1374=
4): Refactor in `collect_apply_args`<br> (Samuel Vivien, revie=
w by Florian Angeletti and Gabriel Scherer)<br><br> - #13787(https://=
github.com/ocaml/ocaml/issues/13787): a new -dcanonical-ids option to show =
canonicalized identifier stamps<br> in -d{lambda,cmm,...} outp=
uts.<br> (Gabriel Scherer, review by Vincent Laviron and David=
Allsopp,<br> suggested by David Allsopp)<br><br> =
- #13820(https://github.com/ocaml/ocaml/issues/13820): Add a new option -i-=
variance to print the variance of every<br> type parameter; bi=
variance is printed as `+-`, and for consistency,<br> parser i=
s modified too to accept `+-` and `-+` as `type_variance`.<br> =
(Takafumi Saikawa and Jacques Garrigue, review by Florian Angeletti)<br><b=
r> - #13828(https://github.com/ocaml/ocaml/issues/13828): Apply BUILD=
_PATH_PREFIX_MAP to Sys.argv.(0) before storing it in .cmt<br> =
and .cmti files.<br> (David Allsopp, review by Daniel B=FCnzl=
i and Gabriel Scherer)<br><br> - #13848(https://github.com/ocaml/ocam=
l/issues/13848): Add all paths components to the cmt files indexes<br> =
; (Ulysse G=E9rard, review by Florian Angeletti)<br><br> - #13=
854(https://github.com/ocaml/ocaml/issues/13854): Make the parser set loc_g=
host more correctly, for `keyword%extension`<br> syntax<br>&nb=
sp; (Valentin Gatien-Baron, review by Florian Angeletti)<br><br>&nbs=
p; - #13856(https://github.com/ocaml/ocaml/issues/13856): Add a new indirec=
tion in types AST called `package` that stores the<br> content=
of a `Tpackage` node<br> (Samuel Vivien, review by Florian An=
geletti)<br><br> - #13866(https://github.com/ocaml/ocaml/issues/13866=
): Modified occurence check that prevents recursive types for it to see<br>=
the checked type as a graph rather than a tree<br> &nbs=
p; (Samuel Vivien, report by Didier Remy, review by Florian Angeletti<br>&n=
bsp; and Jacques Garrigue)<br><br> - #13884(https://gith=
ub.com/ocaml/ocaml/issues/13884) Correctly index modules in constructors an=
d labels paths<br> (Ulysse G=E9rard, review by Florian Angelet=
ti)<br><br> - #13946(https://github.com/ocaml/ocaml/issues/13946): re=
factor the #install_printer code in the debugger and toplevel<br> &nb=
sp; (Pierre Boutillier, review by Gabriel Scherer and Florian Angeletti)<br=
><br> - #13952(https://github.com/ocaml/ocaml/issues/13952): check an=
d document the correctness of `caml_domain_alone ()`.<br> (Gab=
riel Scherer, review by KC Sivaramakrishnan, report by Olivier Nicole)<br><=
br> - #13971(https://github.com/ocaml/ocaml/issues/13971): Keep gener=
alized structure from patterns when typing `let`<br> (Leo Whit=
e, review by Samuel Vivien and Florian Angeletti)<br><br> * (*breakin=
g change*) #13972(https://github.com/ocaml/ocaml/issues/13972): Renamed the=
`-no-alias-deps` flag internal representation to<br> `no_alia=
s_deps` instead of `transparent_modules`.<br> (Clement Blaudea=
u, review by Gabriel Scherer)<br><br> Build system:<br> -------=
------<br><br> * (*breaking change*) #13526(https://github.com/ocaml/=
ocaml/issues/13526), #13789(https://github.com/ocaml/ocaml/issues/13789), #=
13804(https://github.com/ocaml/ocaml/issues/13804): Simplify the build of c=
ross compilers<br> This replaces the configure `--with-target-=
bindir` option by an equivalent<br> `TARGET_BINDIR` variable<b=
r> (Samuel Hym, review by Miod Vallat, Xavier Leroy, Antonin D=
=E9cimo and S=E9bastien<br> Hinderer)<br><br><br> - #134=
31(https://github.com/ocaml/ocaml/issues/13431): Simplify github action res=
ponsible for flagging PRs with<br> the `parsetree-changes` lab=
el and extend it to mention the @ppxlib-dev<br> team.<br> =
; (Nathan Rebours, review by Florian Angeletti)<br><br> - #134=
94(https://github.com/ocaml/ocaml/issues/13494): Use native symlinks on Win=
dows for the OCaml installation, reducing<br> disk usage consi=
derably.<br> (David Allsopp, review by Nicol=E1s Ojeda B=E4r a=
nd Gabriel Scherer)<br><br> - #13789(https://github.com/ocaml/ocaml/i=
ssues/13789): Strictly validate the host and target triplets when building =
for the<br> Windows ports to be *-*-cygwin, *-w64-mingw32* or =
*-pc-windows. Other Cygwin<br> variants used to be rejected - =
other MSVC and mingw-w64 variants are now<br> rejected too.<br=
> (David Allsopp, review by Antonin D=E9cimo and Gabriel Scher=
er)<br><br> Bug fixes:<br> ----------<br><br> - #13819(ht=
tps://github.com/ocaml/ocaml/issues/13819): Fix field initialisation bug in=
runtime events subsystem.<br> (Nick Barnes, review by Gabriel=
Scherer).<br><br> - #13977(https://github.com/ocaml/ocaml/issues/139=
77): Pass `-fPIC` when compiling C files using `ocamlopt`. This was a<br>&n=
bsp; regression in OCaml 5.3.<br> (Nicol=E1s Ojeda B=E4=
r, review by Daniel B=FCnzli and Gabriel Scherer)<br><br> - #13957(ht=
tps://github.com/ocaml/ocaml/issues/13957): Allow 'effect' as attribute id.=
<br> (Pieter Goetschalckx, review by Nicol=E1s Ojeda B=E4r and=
Florian Angeletti)<br><br> - #13691(https://github.com/ocaml/ocaml/i=
ssues/13691) #13895(https://github.com/ocaml/ocaml/issues/13895): Make four=
globals underlying Gc.control atomic to avoid C data<br> race=
s against them.<br> (Jan Midtgaard, review by Miod Vallat, Sad=
iq Jaffer and Antonin D=E9cimo)<br><br> - #13454(https://github.com/o=
caml/ocaml/issues/13454): Output a correct trace of the C_CALLN bytecode.<b=
r> (Miod Vallat, review by Antonin D=E9cimo)<br><br> - #=
13595(https://github.com/ocaml/ocaml/issues/13595): Use x19 as Canonical Fr=
ame Address (CFA) register. This would cause<br> backtraces to=
be truncated when calling no alloc C code.<br> (Tim McGilchri=
st, report by Nick Barnes, review by Nick Barnes)<br><br> * (*breakin=
g change*) #13605(https://github.com/ocaml/ocaml/issues/13605): Fix ungener=
ated constraints when they where impossible due to polyvars<br>  =
; issues<br> (Samuel Vivien, review by Florian Angeletti, Rich=
ard Eisenberg<br> and Jacques Garrigue)<br><br> - =
#13677(https://github.com/ocaml/ocaml/issues/13677), #13679(https://github.=
com/ocaml/ocaml/issues/13679): domain.c: remove backup_thread_running to si=
mplify<br> concurrent state updates to the backup thread statu=
s.<br> (Gabriel Scherer, review by Jan Midtgaard and Miod Vall=
at,<br> report by Jan Midtgaard)<br><br> - #13896(=
https://github.com/ocaml/ocaml/issues/13896), #14098(https://github.com/oca=
ml/ocaml/issues/14098): ocamldoc, do not wrap module description in a parag=
raph tag<br> inside the table of modules<br> (Flo=
rian Angeletti, report by John Whitington, review by Gabriel Scherer)<br><b=
r> - #13703(https://github.com/ocaml/ocaml/issues/13703): wrong expla=
nation for some polymorphic-variant subtyping errors<br> (Gabr=
iel Scherer, review by Jacques Garrigue,<br> report by W=
iktor Kuchta and Richard Eisenberg)<br><br> - #13710(https://github.c=
om/ocaml/ocaml/issues/13710): Support unicode identifiers in comments.<br>&=
nbsp; (Pieter Goetschalckx, review by Florian Angeletti and Gabriel =
Scherer)<br><br> - #13763(https://github.com/ocaml/ocaml/issues/13763=
): Track type of variables bound by as-patterns<br> (Leo White=
, review by Gabriel Scherer, port by Vincent Laviron)<br><br> - #1377=
8(https://github.com/ocaml/ocaml/issues/13778), #13811(https://github.com/o=
caml/ocaml/issues/13811): do not warn for unused type declarations when the=
type is used<br> in a first-class module type (`module S with=
type t =3D int)`.<br> (Florian Angeletti, report by Nicol=E1s=
Ojeda B=E4r, review by Gabriel Scherer)<br><br> - #13790(https://git=
hub.com/ocaml/ocaml/issues/13790): Fix bytecode-only build of Cygwin when f=
lexlink is being bootstrapped<br> with the compiler.<br> =
(David Allsopp, review by Antonin D=E9cimo and Miod Vallat)<br><br>=
- #13812(https://github.com/ocaml/ocaml/issues/13812): Add forgotten=
check about the validity of the type variable name on<br> the=
right-hand side of `_ as _`.<br> (Samuel Vivien, review by Ga=
briel Scherer)<br><br> - #13845(https://github.com/ocaml/ocaml/issues=
/13845): Fix bug in untypeast/pprintast for value bindings with polymorphic=
<br> type annotations.<br> (Chris Casinghino, rev=
iew by Florian Angeletti and Gabriel Scherer)<br><br> - #13930(https:=
//github.com/ocaml/ocaml/issues/13930), #13933(https://github.com/ocaml/oca=
ml/issues/13933): Fix bugs in recursive values definitions involving<br>&nb=
sp; lazy values that have already been evaluated.<br> (=
Gabriel Scherer, review by Vincent Laviron, report by Vincent Laviron)<br><=
br> - #13867(https://github.com/ocaml/ocaml/issues/13867): Fix bug wi=
th some recursive bindings of lazy values.<br> (Guillaume Bury=
and Vincent Laviron, review by Stefan Muenzel<br> and G=
abriel Scherer)<br><br> - #13931(https://github.com/ocaml/ocaml/issue=
s/13931): fix bugs in nested recursive value definitions.<br> =
(Gabriel Scherer, review by Vincent Laviron,<br> report =
by Vincent Laviron)<br><br> - #13875(https://github.com/ocaml/ocaml/i=
ssues/13875), #13878(https://github.com/ocaml/ocaml/issues/13878): Add dedi=
cated constructor for mutable variable access in<br> Cmm to pr=
event bugs linked to incorrect handling of coeffects.<br> (Vin=
cent Laviron, review by Gabriel Scherer)<br><br> - #13880(https://git=
hub.com/ocaml/ocaml/issues/13880): Make object stat counters atomic<br>&nbs=
p; (Dimitris Mostrous, review by Gabriel Scherer and Nicol=E1s Ojeda=
B=E4r)<br><br> - #13172(https://github.com/ocaml/ocaml/issues/13172)=
, #13829(https://github.com/ocaml/ocaml/issues/13829): Fix a missing check =
of illegal recursive module-type<br> definitions<br> &nb=
sp; (Clement Blaudeau, review by Florian Angeletti)<br><br> - #13541(=
https://github.com/ocaml/ocaml/issues/13541), #13777(https://github.com/oca=
ml/ocaml/issues/13777): Using C++11 `thread_local` causes name-mangling<br>=
issues when linking with flexlink on Cygwin.<br> =
(Antonin D=E9cimo and David Allsopp, report by Kate Deplaix)<br><br> =
* (*breaking change*) #13874(https://github.com/ocaml/ocaml/issues/13874),=
#13882(https://github.com/ocaml/ocaml/issues/13882): Make evaluation order=
consistent for applications when using<br> the non-flambda na=
tive compiler<br> (Vincent Laviron, report by Jean-Marie Madio=
t, review by Gabriel Scherer)<br><br> - #13942(https://github.com/oca=
ml/ocaml/issues/13942): Fix assertion on empty array case<br> =
(Olivier Nicole, review by Gabriel Scherer)<br><br> - #13950(https://=
github.com/ocaml/ocaml/issues/13950): Avoid tearing in `Array.sub`<br> =
; (Gabriel Scherer and Olivier Nicole, report by Jan Midtgaard, revi=
ew by<br> Gabriel Scherer)<br><br> - #13928(https:=
//github.com/ocaml/ocaml/issues/13928), #13944(https://github.com/ocaml/oca=
ml/issues/13944): Fix handling of excessively nested unboxed types<br> =
; (Vincent Laviron, review by Gabriel Scherer)<br><br> - #1398=
7(https://github.com/ocaml/ocaml/issues/13987): Remove a spurious TSan repo=
rt in case of benign data race between<br> major GC read and w=
rite from the mutator (fixes #13427(https://github.com/ocaml/ocaml/issues/1=
3427))<br> (Olivier Nicole, report by Thomas Leonard, review b=
y Gabriel Scherer)<br><br> - #14007(https://github.com/ocaml/ocaml/is=
sues/14007), #14015(https://github.com/ocaml/ocaml/issues/14015): Fix memor=
y corruption when an exception is raised during<br> demarshali=
ng.<br> (Beno=EEt Vaugon, review by David Allsopp and Gabriel =
Scherer)<br><br> - #14025(https://github.com/ocaml/ocaml/issues/14025=
): fix data race between compaction and domain termination<br> =
(Gabriel Scherer, review by Jan Midtgaard,<br> report b=
y Jan Midtgaard)<br><br> - #13956(https://github.com/ocaml/ocaml/issu=
es/13956) Fix a regression introduced in #13308(https://github.com/ocaml/oc=
aml/issues/13308) triggering wrong unused warnings.<br> (Ulyss=
e G=E9rard, review by Florian Angeletti)<br><br> - #14070(https://git=
hub.com/ocaml/ocaml/issues/14070): also point to label mismatches in error =
messages for labelled tuples<br> (Florian Angeletti, review by=
Gabriel Scherer)<br><br> - #14088(https://github.com/ocaml/ocaml/iss=
ues/14088), #14091(https://github.com/ocaml/ocaml/issues/14091): fix non-de=
terministic code generation in<br> matching.ml (backport of re=
script-lang/rescript#7557(https://github.com/ocaml/ocaml/issues/7557))<br>&=
nbsp; (Christiano Calgano, review by Gabriel Scherer and Vincent Lav=
iron)<br><br> - #14105(https://github.com/ocaml/ocaml/issues/14105): =
Fix a loop in Pprintast that could result in a hang when printing<br> =
constructor `(::)` in isolation.<br> (Ulysse G=E9rard,=
review by Nicol=E1s Ojeda B=E4r and Florian Angeletti)<br><br> - #14=
108(https://github.com/ocaml/ocaml/issues/14108): toplevel, fix a typo in d=
irective type mismatch<br> (Florian Angeletti, review by Gabri=
el Scherer)<br><br> - #13586(https://github.com/ocaml/ocaml/issues/13=
586), #14093(https://github.com/ocaml/ocaml/issues/14093): Fix closing an o=
ut_channel during flush<br> (Stephen Dolan, report by Jan Midt=
gaard, investigation by Nick Roberts,<br> review by Anto=
nin D=E9cimo and Miod Vallat)<br><br> - #14101(https://github.com/oca=
ml/ocaml/issues/14101), #14139(https://github.com/ocaml/ocaml/issues/14139)=
: define atomic helper types inside `caml/misc.h` to improve<br> &nbs=
p; header compatibility with C++<br> (Florian Angeletti, repor=
t by Kate Deplaix, review by Gabriel Scherer)<br><br> - #14135(https:=
//github.com/ocaml/ocaml/issues/14135): Fix a rare internal typechecker err=
or when combining recursive<br> modules, polymorphic fields or=
methods, and constrained type parameters.<br> (Florian Angele=
tti, review by Gabriel Scherer)<br><br> - #14169(https://github.com/o=
caml/ocaml/issues/14169): runtime, fix cache miss within the stack fragment=
s cache<br> (Florian Angeletti, review by Gabriel Scherer)<br>=
<br> - #14196(https://github.com/ocaml/ocaml/issues/14196), #14197(ht=
tps://github.com/ocaml/ocaml/issues/14197): ocamlprof: do not instrument un=
reachable clauses<br> (Gabriel Scherer, review by Nicol=E1s Oj=
eda B=E4r, report by Ali Caglayan)<br><br> - #14200(https://github.co=
m/ocaml/ocaml/issues/14200), #14202(https://github.com/ocaml/ocaml/issues/1=
4202) : bad variance check with private aliases<br> (Jacques G=
arrigue, report and review by Stephen Dolan)<br><br> - #14061(https:/=
/github.com/ocaml/ocaml/issues/14061), #14209(https://github.com/ocaml/ocam=
l/issues/14209): fix a memory-ordering bug in Weak.set that could<br> =
result in uninitialized memory seen by Weak.get on another domain.<=
br> (Damien Doligez, review by Gabriel Scherer)<br><br> =
- #14214(https://github.com/ocaml/ocaml/issues/14214), #14221(https://githu=
b.com/ocaml/ocaml/issues/14221): fix a confused error message for module in=
clusions,<br> functor error messages were missing some type eq=
ualities potentially leading<br> to nonsensical "type t is not=
compatible with type t" submessage<br> (Florian Angeletti, re=
port by Basile Cl=E9ment, review by Gabriel Scherer)<br><br> - #14238=
(https://github.com/ocaml/ocaml/issues/14238): Fix certain variadic macros =
in misc.h which could trigger C warnings<br> under certain con=
ditions in prerelease versions of OCaml 5.4.<br> (Antonin D=E9=
cimo, review by Nicol=E1s Ojeda B=E4r)<br></div></div></div></body></html>
--=_6c69a8ab-c0e1-446d-a994-2dcc8afa4d44--