Thicket thicket
ocaml
REPOS 27
W44.2026 · 26 Oct – 1 Nov

All repository summaries

12 active · 15 unchanged

Back to weekly digest

ocaml-multicore/eio

Permalink

Features

  • Eio_unix.Backend_config added; fixed buffers disabled by default (#960, merged 2026-11-01). Eio_main.run accepts a ~config argument to set io_uring parameters (queue depth, fixed-buffer size) without dropping to Eio_linux.run.
  • Executor_pool.create gains ?on_error (#959, open). A worker domain that fails to create an io_uring ring no longer kills the pool; the handler receives the exception and the pool continues with remaining workers.

Fixes

  • Fixed buffers off by default in eio_linux (#845, closed 2026-11-01). Old ZFS versions trigger a kernel bug with fixed buffers that requires a reboot; the default now avoids this.

Compatibility

  • Reduced RLIMIT_MEMLOCK pressure per domain. Disabling the 256 KiB fixed buffer cuts a worker domain's locked-memory cost roughly 30×, relevant in containers where the default 8 MiB limit is shared across all processes of a uid (#958, open).
  • io_uring ENOMEM in non-main domains remains unhandled (#958, open). Eio_main.run falls back to eio_posix for the main domain, but Domain_manager-started domains still raise failwith "io_uring is not available (ENOMEM)". The ?on_error proposal in #959 addresses this at the pool level.

ocaml/RFCs

Permalink

Features

  • Constructor unboxing RFC (#14) was updated 2026-10-31 and remains an open proposal. It extends [@@unboxed] to eliminate the block for unary constructors whose argument types are distinguishable at run-time, reducing allocation and indirection. An undated comment references a rebased implementation in PR #15227; the comment's date cannot be established from the supplied data.

ocaml/dune

Permalink

Features

  • Assembly sources (.s, .S, .asm) are now recognised in foreign_stubs and foreign_archive stanzas via (language asm). The C compiler is used as the assembler on most platforms; MSVC requires a separate assembler binary. Opened by @Alizter; not yet merged. (#16849)

  • PPX rewriters receive a compilation-mode cookie identifying the OCaml or Melange target. Available under (lang dune 3.26) and later. Merged 2026-10-29. (#16699)

  • A prototype for RPC-backed rule plugins lets a project define custom stanza-like forms in OCaml, invoked as (plugin.name args …). Requires (lang dune 3.26) and (using plugin 0.1). The existing site-plugin stanza is renamed to (dune_site.plugin …). Ongoing; updated 2026-10-27. (#16760)

  • dune build forwarded to a running watch-mode server now displays a progress line (e.g. Done: 94% (89/94, 5 left)). Merged 2026-10-30. (#16819)

Fixes

  • Watch-mode builds no longer hang indefinitely when the file watcher loses a sync-file notification. Pending syncs are retried with fresh marker IDs after overflow, and a five-second timeout triggers a retry when no notification arrives. Merged 2026-10-27 and 2026-10-30. (#16756, #16850)

  • When a CPU-count probe (e.g. nproc) cannot be spawned, dune falls back to the next detection command instead of retrying the same command. Fixes a hang on macOS 27 where nproc is an x86 binary. Merged 2026-10-27. (#16767)

  • Overlapping directory dependencies in sandboxes are populated only once, eliminating the symlink … File exists error when a rule with (deps (package …)) runs a binary from its provider package. Merged 2026-10-28. (#16806)

Compatibility and Releases

  • The 3.25 changelog now documents that actions no longer see _build/install/<context> on PATH/OCAMLPATH/CAML_LD_LIBRARY_PATH unless they declare (deps (package …)). This was a breaking change previously omitted from the release notes. Merged 2026-11-01. (#16859)

  • Binary lookups (%{bin:…}, action PATH, staged binaries) from a package-owned directory are narrowed to that package's declared dependencies, reducing the set of packages that must be built to resolve a single binary. Merged 2026-10-28. (#15381)

ocaml/merlin

Permalink

Fixes

  • Merged: Index regression fix for path relativisation in ocaml-index. Prevents dir/../ segments from accumulating in resolved paths. (#2144)
  • Open: Collects UIDs of type extensions so the Occurrences query detects all references, fixing incomplete rename results reported in #853. (#2146)

Features

  • Open: ocaml-index replaces its random per-file ID with a content digest, making index output deterministic across builds. Measured cost: ~2–3 % slower, 3–6 % more memory. (#2147)
  • Open: New --standalone flag for ocaml-index inlines component-index data into the output file, removing external pointer dependencies. A no-op --no-standalone flag is added as the default. (#2148)

Compatibility

  • Closed: #1233 confirms the Dune unit-name mismatch (e.g. foo.ml defining Bar__Foo) is resolved by the finer-grained Dune configuration loader already in place.
  • Closed: #1034 confirms the Windows PPX-evaluation I/O error is resolved by the fix in #714.

ocaml/ocaml

Permalink

Fixes

  • #15204 (merged): Pattern matching on a mutated variant field was treated as exhaustive when it was not, causing segfaults. The partiality record now propagates the downgrade correctly.
  • #15208, #15213 (merged): Two flambda miscompilations fixed. -Oclassic alias analysis produced garbage values by treating symbol fields as aliased to the symbol; float-array lifting on a dead GADT branch triggered a fatal error.
  • #15168 (merged): Scanf.unescaped now handles octal (\oNNN), uchar (\u{…}), and backslash-space escapes, matching the lexer. Fixes #14930.
  • Issues #15205, #15189 (open): Native Atomic.exchange and Atomic.compare_and_set miscompile on amd64 when the result register is spilled; regression from #14980. Fixes in progress via #15207 and #15192.

Features

  • #15167 (merged): ocamldep gains a -strict flag that exits non-zero on missing files or parse errors and produces no output on failure. Fixes #15132.
  • #15227 (open): Head shapes and constructor unboxing extends [@unboxed] to multi-constructor variant types. Open for review; includes specification and implementation documents.

Compatibility and Releases

  • #14602 (merged): Unix.rename and Sys.rename on Windows now succeed when the destination file is read-only, matching POSIX semantics.
  • #15219 (open): Fast path for variance checking of constrained parameters reduces compilation of the #15163 benchmark from 760 s to 3.7 s (99.5 %).

ocaml/ocaml-lsp

Permalink

Features

  • Merged: New ocamllsp/completePrefixAtPos custom LSP request lets an Emacs client ask the server to complete a given prefix at a given position, replacing the need to spawn a separate merlin complete-prefix process. (#2230, spwhitton)
  • The request omits snippet items, deprecation tags, lazy completionItem/resolve data, in-keyword completions, and typed-hole (_) construct completions; variants always carry kind EnumMember.

Fixes

  • Open: The VSCode "ml/mli" button generates a .mli that includes modules hidden behind open struct … end wrappers; saving the file causes a compilation error because those definitions are absent from the interface. ocamlc -i produces the correct output. No fix merged yet. (#2231, sim642)

ocaml/ocaml.org

Permalink

Features

  • OCaml Planet now has keyword-based search with faceted filtering (type, source, year, keyword, author) over 2,378 posts. Keywords are generated at scrape time and backfilled for existing posts. #3907, #3908

  • Per-document "Authors and history" records are precomputed from git history and baked into data.bin. The generator recovers pre-v3 authorship from v2.ocaml.org and ocaml-tutorial.org, crediting 22 tutorials with their original authors. #3904

  • The MCP server endpoint (/mcp) is re-enabled after a security hardening pass. The tool page at /tools/docs-mcp is refreshed with verified vendor documentation. #3899

Compatibility and Releases

  • Package state persistence moves from Marshal to a repr-derived binary codec. The GraphQL field packgeByVersions is renamed to packageByVersions (breaking for external callers of the old spelling). #3903

  • A stacked PR series (#3923–#3928, open) extends mdx testing to 36 of 45 OCaml-bearing tutorials (671 live blocks, up from 41) and adds a tripwire that fails the build when an allow-listed file tests nothing.

Fixes

  • Tutorial search: Str replaced by Re (fixes crash on regex characters), snippets cut at UTF-8 boundaries, and Unicode case folding enables accented-text matching. Sectionless documents are now searchable. #3911, #3913, #3915, #3917, #3922

  • MCP server: POST body capped at 1 MB (413 on excess), rate limiter no longer bypassable via X-Forwarded-For spoofing, docs fetch has a 30 s timeout, and caches are byte-bounded. #3891, #3893, #3894, #3895, #3897

  • Inline code inside a prose link now inherits the link colour, so code-only links (e.g. Map on /docs/maps) are visually distinguishable from plain code. #3882

ocaml/odoc

Permalink

Features

  • Native sherlodoc index proposal (opened): #1513 proposes emitting a versioned, zero-dependency portable index alongside the existing sherlodoc_db.js, enabling server-side query without a JS runtime. Targets odoc_driver_voodoo output for ocaml.org MCP search.

Compatibility and Releases

  • odoc 3.2.2 released (2026-10-26): Release 3.2.2 adds OCaml 5.6 support and removes reliance on ocamllex raising Failure for unescaped braces (a 5.6 deprecation). Also drops the ppx_expect test dependency.
  • Original formatter implementation restored (merged 2026-10-28): #1508 re-enables the formatter code path disabled since 2020, now safe with the minimum OCaml version at 4.08.
  • Windows CI build fixes (opened, updated 2026-10-27): #1509 addresses text/binary mode handling, path normalisation in tests, and sherlodoc marshalling on Windows. Several pre-existing issues (symlink resolution, $PWD) remain unresolved.

Fixes

  • Ambiguity warning now shows unit paths (merged 2026-10-28): #1507 changes the warning from duplicate file names (Foo\nFoo) to distinct unit paths (b/Foo, a/Foo), making the diagnostic actionable.
  • Lexer warning position corrected (merged 2026-10-26): #1510 fixes the unescaped '{' warning to report the opening brace column instead of an off-by-one position.
  • Cpath hidden-path check aligned (opened 2026-10-30): #1514 makes Cpath.is_hidden consistent with Paths.is_hidden; the two previously disagreed on several path shapes.

ocaml/opam

Permalink

Fixes

  • Interrupting opam repository add with SIGINT no longer leaves the repository in the configuration. The initial fetch is wrapped so any exception triggers cleanup before re-raising. (#7227, open)

  • opam source now applies patches and extra-files inside the package's x-subpath directory rather than the extraction root. Packages without a subpath are unaffected. (#7225, open)

  • A missing depext on a pinned version was not reported, falling through to a generic unavailable message. The check now runs on the pinned version rather than the highest satisfying version. (#7213, open)

  • opam unpin of a pin-depend and its reverse dependency in one command raises a raw Not_found exception (exit code 99). The unpin leaves state referencing a package no longer defined. (#7223, open)

Features

  • Ports opam to Illumos (OpenIndiana, OmniOS). Uses gtar for archive extraction and includes termios.h for TIOCGWINSZ under __sun. Tested on OpenIndiana 2026.04. (#7226, open)

  • Introduces OpamPackage.Uniset, a name-to-version map enforcing at most one version per package name. Simplifies lookup of installed and pinned packages; open for review. (#7224, open)

Compatibility and Releases

  • Proposes adding test dependencies (e.g. micro_httpd) to the full-archive so make test succeeds without manual setup after a cold build. (#7228, open)

ocaml/opam-repository

Permalink

Features

  • windtrap 0.3.0 (merged): Major breaking release of the testing library. Tests now run in worker processes (a crash or hang fails one test, not the run); shrinking operates on generator choices rather than value trees; a test that checks nothing fails as VACUOUS. #31062

  • thumper 0.1.0 (merged, new package): Micro-benchmarks as regression tests. A dune rule runs a benchmark executable and fails the build when a case exceeds its committed baseline budget. Depends only on unix; ISC-licensed. #31072

  • imguiml 1.93.0 (merged): Updated to Dear ImGui 1.93.0-docking. Fonts now load via FreeType (CFF2, variable fonts); ImWchar is 32-bit (emoji no longer replaced by U+FFFD); several API signatures changed (PushFont takes a size, OpenPopup returns a bool). #31032

  • Eliom 13.0.0 (submitted, merged after interval): Major release wrapping module names (Eliom.Service, Eliom.Content, …). New eliom-compat package provides old Eliom_xxx names as aliases. Server-side data serialised with Deriving_Json instead of Marshal. Requires Ocsigen 8.0, TyXML 5.0, OCaml ≥ 4.14. #31073

Fixes

  • zstandard v0.16.1 / v0.17.1 (merged): Fixes an out-of-bounds memory read in decompressed_size. #31042

  • coq-stdlib < 8.19.0 incompatible with OCaml 5.6 (merged): Gc.stat is deprecated in 5.6 and the build uses warn-error; the package now carries an upper bound on OCaml. #31039

Compatibility and Releases

  • Dune 3.25 upper bounds (merged, two PRs): Dune 3.25 sandboxes ctypes stub generation, so packages with undeclared C headers fail to build. Upper bounds on dune 3.25 added to quickjs, raylib, hdr_histogram, xedbindings, tinyfiledialogs, pari-bindings, libinput, utop, iter, msat, spelll, printbox-text, printbox-html, datalog, routes, search, flint, ctypes-zarith. #31065, #31051

  • introcaml 5.5.2 (merged): Object files and executables now use introcaml-specific magic numbers (Caml1999?901); packages built with a previous introcaml must be rebuilt. cmi/cmt/ast keep the upstream format. #31048

ocsigen/js_of_ocaml

Permalink

Features

  • Wasm-JS boundary (#2563, merged): JavaScript values now use externref; floats pass as f64, integers as i32. A short-string cache (≤ 16 bytes) avoids repeated allocation; method-call overhead drops from ~16 ns to ~5 ns on V8.

  • Wasm exceptions (#2098, merged): Functions under a handler signal by storing in caml_exception and returning null; the caller tests with br_on_null. On ocamlc at --opt 2, run time drops 24% and Wasm exceptions thrown fall from 5.1 M to 9.5 k.

  • JS sentinel exceptions (#2582, open): The JS backend signals exceptions via a sentinel return value instead of throwing a JavaScript exception. On the ocamlc benchmark this cuts run time from 16.5 s to 8.9 s; enabled by default with --effects=disabled.

  • Binaryen optional (#2571, open): Without wasm-opt, wasm_of_ocaml uses internal passes (duplicate elimination, local coalescing) and emits a warning at --opt 2/3. The WASM_OF_OCAML build gate is removed; a plain dune build now compiles Wasm targets.

Fixes

  • Solver worklist stack overflow (#2568, merged): The dataflow solver traversal switches to an explicit stack beyond depth 1000, preventing a "Maximum call stack size exceeded" failure when compiling js_of_ocaml.bc to Wasm. Generated code is unchanged.

  • Require Binaryen ≥ 120 (#2580, merged): Version 119 incorrectly refines the type of the exported caml_exception global, causing link failures for programs using the null-return exception convention.

Compatibility and Releases

  • Skip wasm-opt at --opt 1 (#2238, merged): wasm_of_ocaml no longer invokes wasm-opt at --opt 1; internal passes (local coalescing, sink, reorder) replace it. Compilation time drops ~60% for the test suite; variable names are preserved for debugging.

  • ppx_devtools extracted (#2564, #2566, merged): ppx_devtools (optcomp + expect) moves to ppx_devtools; in-tree copies are removed. js_of_ocaml depends on the external package via pin-depends until its first opam release.

oxcaml/oxcaml

Permalink

Features

  • Formally verified SSA loop deletion and bounds-check elimination (proposal). Two new passes, -ssa-delete-empty-loops and -ssa-bounds-check-elim, derive their decisions from OCaml extracted from a Rocq development that proves soundness. Off by default; no Admitted statements. #7802

  • Dereference and address patterns (experimental, in progress). deref_ patterns reference a record field's or tuple element's address; addr_/addr_imm_ patterns match an address against its contents. Parsing and type-checking merged; lambda translation and warning refinements are open. #7707, #7731, #7776

  • Mode polymorphism: typing and printing (experimental, in progress). Mode variables 'm, bounds [< … > …], and morphisms past/close are now parsed, typed, and printed with alias sharing. Currying constraints are generated implicitly. #7503, #7771

  • Feedback-directed optimization counters (research direction). New Fdo_counter_identity and Fdo_counter types define function/position identities for pseudo-instrumentation; a companion pass inserts callsite and branch counters during closure conversion. #7530, #7729

  • Zero-allocation backend: conditional call-site reasoning (proposal). The backend now propagates [@@zero_alloc conditional] obligations through call sites, so e.g. List.iter ignore xs is recognised as non-allocating. #7722

  • -ffp-contract=on|off for arm64 (proposal). Controls whether the arm64 selector contracts nested binary64 multiply-add/subtract into FMA. Defaults to on; off emits separate mul+add. Also settable via OCAMLPARAM ffp-contract. #7813

Fixes

  • Demarshaler and Unix.map_file hardening (security). The demarshaler now validates closure metadata, guards against size wraparound, and rejects forged tags (OSEC 2026-01/18/23). Unix.map_file multiplies dimensions via caml_umul_overflow to prevent undersized mappings (OSEC 2026-22). #7770, #7767

Compatibility and Releases

  • Stdlib.Effects.Safe renamed to Yielding (proposal). The Safe API does not guarantee all effects are handled; the rename and a doc comment make the contract explicit. Tests using reperforming behaviour now use With_handler. #7764
15 repositories · no changes