Thicket thicket
ocaml
REPOS 9

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

W44.2026 · 26 Oct – 1 Nov

Tools repository summaries

6 active · 3 unchanged

Back to weekly digest

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-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/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)

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.

3 repositories · no changes