OCaml trunk merged the [@atomic] record-field attribute, compiling reads and writes to atomic operations, and fixed a Marshal.from_string segfault from spurious GC-root registration, with backports to 4.14, 5.3, and 5.4 planned. opam 2.4.0~alpha2 was released, resolving an extreme performance regression in large repository updates.
Features
OCaml trunk: merged [@atomic] record fields; reads and writes compile to atomic operations. Atomic.Loc exposes get, set, exchange, compare_and_set, fetch_and_add, incr, decr. #13404
OCaml trunk: merged Unix.unsetenv : string -> unit to remove a variable from the process environment. Uses _wputenv_s on Windows. #14020
OCaml trunk: merged Option.product and an Option.Syntax submodule with binding operators, mirroring List.Syntax and Seq.Syntax. #13916
opam 2.4.0~alpha2: opam switch create now excludes compiler packages flagged avoid-version or deprecated from the generated invariant. Release notes
Compatibility
OCaml trunk (proposal): terminating domains orphaned shared-heap pools after leaving the STW participant set, so the compactor could run on untracked pools, causing segfaults. The proposal moves orphaning before STW exit; not yet merged. #14025
opam 2.4.0~alpha2: removes the OPAMSTATS environment variable, the OpamFile.Stats module, OpamSystem.print_stats, and the OpamClientConfig STATS variant. Release notes
Fixes
OCaml trunk: Marshal.from_string could segfault when a GC triggered by exception allocation left a partially initialized block registered as a GC root. Fix removes the spurious registration; backport to 4.14, 5.3, 5.4 planned. #14015
OCaml trunk: if child-domain initialization failed, the domain lock was not released, causing a permanent deadlock on the next Domain.spawn call. The lock is now released on the failure path. #13953
OCaml 5.4: a labeled-tuples change caused type_approx to drop type constraints inside tuples for mutually recursive functions, producing a misleading error. The fix restores 5.3/trunk behaviour. #14021
opam 2.4.0~alpha2: fixes an extreme performance regression where applying a large repository update took several hours. Release notes
js_of_ocaml: merged a rewrite of the register-coloring pass, significantly reducing compilation time. #1971
Releases
opam 2.4.0~alpha2: released. The install script now lists it as a selectable version. #6511