Thicket thicket
ocaml
REPOS 9

Tools covers builds, package management, editors, documentation and JavaScript compilation.

W37.2026 · 7–13 Sep

Tools repository summaries

6 active · 3 unchanged

Back to weekly digest

ocaml/dune

Permalink

Features

  • Breaking: Generated files are now always made read-only, removing the pre-2.4 language-version opt-out. Executable bits are preserved; builds behave identically with or without the shared cache. #16388

  • Breaking API: Dune_rpc_lwt.V1.Action_plugin.run now returns unit Lwt.t instead of driving the event loop or exiting the process. Callers must use Lwt_main.run and manage process lifetime. #16404

  • Action plugins now support multiple dynamic-run invocations per rule (via progn or concurrent) and honor with-accepted-exit-codes. Each invocation retains its working directory; discovered inputs invalidate the enclosing rule. #16403, #16402

  • New Action_plugin.build_deps API exposes batches of file, directory, and glob dependencies. Plugins can wait for these and use ordinary I/O without reading contents through the plugin API. #16394

Fixes

  • Action-plugin dynamic-run now forwards with-stdout-to to the subprocess, writing output to the requested target instead of Dune's terminal. #16376

  • Action-plugin dependency paths are resolved from the client's current directory rather than its launch directory, fixing reads after a chdir. #16384

  • Menhir type inference with package management and the relocatable compiler fails with Unbound module Stdlib on macOS. A fix adding an explicit stdlib dependency and path reclassification is in review. #16374

  • Melange mode now resolves .cmi, .cmt, and .cmti against the OCaml module set first, falling back to Melange artifacts, fixing regressions in mixed builds. #16339

ocaml/merlin

Permalink

Features

  • #2121 (open, panglesd & PizieDust): Reworks the enclosing/Selection Range request to select sub-expressions incrementally instead of jumping to the full parent node. Adds merlin_loc to sequence expressions and handles nested type-constraint layers.

Compatibility and Releases

  • #2124 (closed): Merlin 5.8.1 fails to build on Haiku because ocamlmerlin.c links without -lnetwork. Closed 2026-09-14; the record does not state the resolution.
  • #2050 (closed): Proposes replacing the indexer's unbounded hashtable with an LRU cache to bound memory. Closed in favour of PR #2079.

Fixes

  • #2120 (merged): Corrects merlin_loc for constrained expressions so let _ = 1 in (x : int) extends the location over both the in gap and the constraint parentheses.
  • #2123 (open): ocamlmerlin single complete-prefix reports "deprecated": false for record fields carrying [@deprecated]. Affects downstream OCaml-LSP deprecation markers.
  • #2122 (open): Go-to-definition and occurrences fail on self#method calls, returning "Locate: not in environment".
  • #1917 (open, updated): Proposes go-to-definition fixes for := and custom indexing operators, including a heuristic for single-indexing forms.

ocaml/ocaml-lsp

Permalink

Features

  • Whole-call completions (merged): Functions with ≥2 labelled or optional arguments now offer a secondary (call) completion that inserts a snippet with independent _ placeholders per argument. Snippet-capable clients receive one edit; others get plain text. #2199

  • Constructor application completions (merged): Constructors with payloads offer parenthesized application variants with _ slots (e.g. Pair _ _ for int * bool). Name-only entries remain and sort first. Available in expression and pattern positions. #2212

  • Go to Implementation for interface types (merged): textDocument/implementation resolves type-declaration names in .mli files to their .ml counterparts, including nested modules, functor results, includes, and aliases. Fixes #1163. #2074

  • Interactive destruct bodies (merged): destruct and destruct-line generate branch bodies as snippet placeholders, allowing tab-navigation between them. Requires workspace.workspaceEdit.snippetEditSupport; plain edits are the fallback. #2204

  • Semantic highlighting: parameters and built-in types (merged): Function parameters now emit the standard parameter token type with custom labeled/optional modifiers. Predeclared types (int, string, etc.) receive the defaultLibrary modifier; shadowed names are not marked. #1857, #1858

  • Odoc document links (open): Implements textDocument/documentLink and documentLink/resolve so {!ref} and {{:url} text} in doc comments become clickable links in editors. Cross-module and stdlib references resolve once the project is built. #2139

Fixes

  • Overlapping with type tokens (merged): Constrained names in with type equations and destructive substitutions were emitted twice (long identifier + type-declaration name). The duplicate token is no longer produced. #2206

  • Inline edit crash avoidance (merged): The Inline code action now checks applicability before constructing replacement edits, preventing a crash on deeply recovered expressions with no recognized uses. #2041

ocaml/odoc

Permalink

Features

  • odoc/odocl file compression (#1486): When the compiler supports it, odoc and odocl files are now compressed, reducing file sizes by roughly 4–5×. Merged 2026-09-11 by @jonludlam.

  • include functor display for OxCaml (#1452): Generated docs now show that items were included via a functor. Merged 2026-09-11 by @Leonidas-from-XIV.

  • Canonical chain search fix (#1483): Resolves broken cross-references when a wrapper module omits some library modules, enabling @canonical tags in those cases. Merged 2026-09-11 by @jonludlam.

Compatibility and Releases

  • Removed id wrapper (#1479): Eliminates an unnecessary identifier indirection, reducing overall disk usage by ~30% with no measurable speed change. Merged 2026-09-07 by @jonludlam.

  • Merged word runs in internal AST (#1488): Consecutive Word/Space comment tokens are stored as a single Word string. The odoc-parser AST is unchanged; ocamlformat is unaffected. Merged 2026-09-11 by @jonludlam.

Fixes

  • OCaml 5.5 optional-argument rendering (#1489): OCaml 5.5 wraps optional arguments in a TPoly constructor that odoc previously rendered as ???. The fix unwraps them. Merged 2026-09-07 by @jonludlam.

  • Extended open support (#1482): Two related fixes for extended-open handling in generated documentation. Merged 2026-09-08 by @jonludlam.

  • Memoized docstring parsing (#1480): Repeated doc-comment texts (common with ppx_template) are parsed once and shared. On OxCaml code: −13% user CPU, −18% .odoc / −23% .odocl file size. Merged 2026-09-11 by @jonludlam.

ocaml/opam

Permalink

Features

  • #7138 (open): Adds explicit Haiku platform support to the build system.
  • #7136 (open): Upgrades the release lockfile to build opam with OCaml 5 by default on 64-bit platforms; both 4.14 and 5.x binaries ship in the archive.
  • #7140 (open): Proposes investigating landlock(7) as a sandboxing replacement for bubblewrap, potentially removing a dependency.

Fixes

  • #7131 (merged, in 2.6.0~rc1): Skips opening tar.gz repositories during install when extra-files is empty, saving ≥500 ms per package. Fixes a 2.6 performance regression.
  • #7139 (open): Makes opam switch --switch <name> show exit with an error when the named switch is not installed, instead of printing the name and exiting 0.

Compatibility and Releases

  • 2.6.0~rc1 released 2026-09-08. Binaries signed by the opam dev team; see the blog post for upgrade instructions.
  • #7130 (merged): OpamStd.Map.update now delegates to the stdlib Map.update, changing the signature and adding binding-deletion capability. Breaking for existing callers of the old three-argument form.

ocsigen/js_of_ocaml

Permalink

Features

  • Introcaml runtime introspection in JS (open, by hhugo): Block allocations and tuple constants carry descriptor indices; Introspect.Print on options, lists, records, variants, and closures produces output matching the native binary. Gated behind --enable/--disable introspection, enabled by default only on Introcaml-built compilers. #2430

  • Base64 encoding for large binary string constants (open, by hhugo): Constants above a size threshold are emitted as base64 literals decoded once at init, reducing a 3 MB binary payload from 8.3 MB to ~7 MB of generated JS. Short strings remain escaped. #2432

  • Wasm toplevel function splitting (open, by vouillon): A new Split_toplevel pass outlines runs of instructions at liveness boundaries into separate functions, controlled by split-toplevel and toplevel_split_size. Addresses Binaryen/TurboFan failures on large programs. #2423

Fixes

  • Safari 17 static class-field misparse (merged, by habakan): The printer now uses a non-breaking space after static in all four class-element cases, preventing JavaScriptCore 17 from reading a line break as a field separator. Fixes Int64.of_string crashes on Safari 17.x. #2421

  • ASI over-insertion after async/using identifiers (open, by hhugo): The parser previously inserted a semicolon after any line break following these words, breaking x = async\n+ 1 and var async\n= 1. Semicolons are now inserted only before the restricted continuations the spec requires. #2422

  • Single linear memory for Wasm (merged, by vouillon): The four previously separate linear memories (scratch buffer, zstd, blake2, wasi libc) now share one, resolving Safari's lack of multi-memory module support. #2405

Compatibility and Releases

  • Introcaml build support (merged, by let-def, hhugo): js_of_ocaml now builds on the 5.5.0+introcaml opam switch; new Config.oxcaml/Config.introspect flags gate stubs, and unmarshalers skip Introcaml's reserved-bits prefix. Plain 5.5.0 output is unchanged. #2409

  • Toplevel build with tyxml 5 (merged, by hhugo): tyxml 5.0.0's new s element shadowed a string argument in the colorize helpers, breaking type-checking. Arguments renamed to avoid the capture. #2425

3 repositories · no changes