Platform Newsletter: May to August 2025

Welcome to the fifteenth edition of the OCaml Platform newsletter!

In this May to August 2025 edition, we are excited to bring you the latest on the OCaml Platform, continuing our tradition of highlighting recent developments as seen in previous editions. To understand the direction we're headed, especially regarding development workflows and user experience improvements, check out our roadmap.

You can comment on this newsletter on the OCaml Discuss Forums!

You can subscribe to this newsletter on LinkedIn!

Highlights:

  • Enhanced Editor Integration: OCaml-LSP 1.23.0 and Merlin 5.5 provide improved project navigation and error reporting. New ocaml-eglot brings modern LSP support to Emacs users. Continued work on project-wide features brings OCaml's development experience closer to modern IDEs.
  • Enhanced Package Management: opam 2.4.0 stable release eliminates GNU patch/diff dependencies, improves newcomer experience by avoiding problematic system compilers by default, and provides better handling of deprecated packages. This addresses common setup issues that previously complicated OCaml adoption.
  • Improved Testing Workflows: Dune 3.20 introduces concurrent watch mode operations, named test aliases for running specific tests (@runtest-testname), and timeout support for cram tests.
  • Documentation and Tooling Maturity: Odoc 3.1.0 refines cross-package linking capabilities.
  • OCaml 5.4.0-beta1: you can help test upcoming compiler improvements!

Announcements:

Stable Releases:

Unstable Releases:


Dune

Roadmap: Develop / (W4) Build a Project

The release introduces the dune describe location command for printing the path to executables.

dune runtest now understands absolute paths and can run tests in specific build contexts. Improvements to cram test handling fix issues where tests attached to multiple aliases would run multiple times.

Testing Workflow Improvements

Dune 3.20 significantly improves testing workflows with named test aliases. Tests declared with (test (name a)) can now be run individually using dune build @runtest-a. Inline test libraries produce aliases like @runtest-name_of_lib, allowing targeted execution of specific test suites without running the entire test battery.

The new (timeout <float>) field for cram tests prevents runaway tests from blocking CI pipelines. Combined with the ability to run dune promote while watch mode is active, these features remove common friction points in test-driven development workflows.

Performance and Watch Mode Enhancements

Dune's watch mode now supports concurrent dune exec operations and file promotion without requiring restarts, maintaining development flow during iterative changes.

The introduction of the 'empty' alias containing no targets provides more flexible build target management. New --alias and --alias-rec flags offer alternatives to the @@ and @ command-line syntax.

Dune 3.20 switches from MD5 to BLAKE3 for digesting targets and rules, providing both performance improvements and better cryptographic properties.

Activities:

  • Enhanced implicit transitive dependency handling for OCaml 5.2+ compatibility (#11866)
  • Improved alias system with new 'empty' alias support (#11556, #11952, #11955, #11956)
  • Better integration between promotion workflows and watch mode (#12010)
  • Fixed cram test duplicate execution issues (#11547)
  • Added timeout support for cram tests (#12041)
  • Added dune describe location command (#11905)
  • Named test aliases for targeted test execution (#11558, #11109)
  • BLAKE3 migration for improved performance (#11735)

Maintained by: Rudi Grinberg (@rgrinberg, Jane Street), Nicolás Ojeda Bär (@nojb, LexiFi), Marek Kubica (@Leonidas-from-XIV, Tarides), Ali Caglayan (@Alizter), Etienne Millon (@emillon), Stephen Sherratt (@gridbugs, Tarides), Antonio Nuno Monteiro (@anmonteiro), Etienne Marais (@maiste, Tarides)

Dune Package Management

Portable lock directories appear as an experimental feature. This is a major prospective enhancement for teams working across different platforms. Lockfile naming in the experimental feature now includes version numbers (e.g., ocaml-compiler.5.3.0.pkg instead of ocaml-compiler.pkg) to handle cases where different platforms require different package versions in the same project.

The portable external dependencies feature extends this capability to system-level dependencies, ensuring consistent build environments across development, testing, and production systems. Combined with the existing binary cache system, this could reduce the complexity of managing OCaml projects in diverse environments.

Note however, that the outcome of these experiments, and whether they mature into features on the stable version of Dune is still open. If you would like to help test and give feedback: run dune pkg lock and, if you encounter issues, please report them!

At dune.check.ci.dev, continuous monitoring shows ecosystem compatibility progress, with a large part of Dune-based packages in opam-repository now building successfully with Dune package management.

Activities:

Dune Developer Preview

Dune Developer Preview continues to serve as an experimental channel for cutting-edge OCaml development features. The tooling includes built-in LSP support, formatting capabilities, and a shared cache that improves build performance.

The team has expanded testing beyond initial projects to include broader ecosystem validation. The binary repository provides static Linux binaries (built with musl) that work across distributions, along with native binaries for macOS on both x86_64 and aarch64 architectures.

Activities:

  • Enhanced LSP integration through automated tool management
  • Expanded ecosystem compatibility testing as documented in the Opam Health Check blog post

Package Management

Opam

The stable release of opam 2.4.0 represents a significant improvement in cross-platform reliability and user experience. The elimination of GNU patch and diff as runtime dependencies removes a major source of configuration issues that previously complicated deployment and CI/CD pipelines. The package manager now uses the native OCaml patch library instead.

The default compiler selection during opam init no longer uses ocaml-system, which was a common source of setup problems across different development environments. This change provides a more consistent onboarding experience for newcomers to OCaml.

Package lifecycle management receives clearer visibility through enhanced handling of deprecated packages. The opam show command displays deprecated packages in gray, while opam upgrade removes confusing "not up-to-date" messages for packages being phased out.

Development workflows benefit from the new OPAMSOLVERTOLERANCE environment variable, which addresses persistent solver timeout issues. The enhanced pinning system now displays current revisions of pinned repositories, providing better transparency in development workflows that rely on unreleased versions.

For Windows users, the prebuilt binaries now include Cygwin's setup executable as a fallback when cygwin.com is inaccessible, improving reliability in restricted network environments.

Notable Activity:

  • opam 2.4.0 stable release with comprehensive improvements
  • Use patch OCaml library instead of the patch command (#5892)
  • UX improvements: remove ocaml-system from default compiler at init (#6307)
  • Provide a way to avoid solver timeouts (#5510)
  • Add opam lock <pkg> --keep-local (#6411)

Maintained by: Raja Boujbel (@rjbou, OCamlPro), Kate Deplaix (@kit-ty-kate, Ahrefs), David Allsopp (@dra27, Tarides)


Editor Tools

Roadmap: Edit / (W19) Navigate Code, Edit / (W20) Refactor Code

OCaml LSP Server and Merlin

The release of OCaml-LSP 1.23.0 and Merlin 5.5 brings enhanced project navigation and error reporting capabilities. The release addresses several long-standing issues with jump-to-definition, occurrences reporting, and inlay hints while adding new utilities for working with typed holes.

Project-wide features continue to evolve, with cross-project symbol search and refactoring capabilities bringing OCaml's editor support in line with other modern programming languages. The features work by building an index with dune build @build-index -w and provide comprehensive symbol searching across entire codebases.

By the way: we are currently working on a refactor feature that enables automatically extracting and inlining function parameters!

Support for OCaml 4.14 continues with dedicated releases (OCaml-LSP 1.21.0-4.14 and Merlin 4.19-414).

Activities:

Notable Activity:

OCaml LSP Server maintained by: Ulysse Gérard (@voodoos, Tarides), Xavier Van de Woestyne (@xvw, Tarides), Rudi Grinberg (@rgrinberg, Jane Street)

Merlin maintained by: Ulysse Gérard (@voodoos, Tarides), Xavier Van de Woestyne (@xvw, Tarides)

Emacs Integration

The introduction of ocaml-eglot provides Emacs users with modern LSP-based OCaml support as an alternative to the traditional merlin.el. This package leverages Emacs 29's built-in eglot LSP client, offering simplified configuration and access to project-wide features previously unavailable in Emacs.

ocaml-eglot provides feature parity with other editors through ocaml-lsp-server, including project-wide search and rename capabilities. For users migrating from merlin.el, existing keybindings work immediately. The package is actively maintained, while merlin.el enters maintenance-only mode.

The integration works with any OCaml major mode (tuareg, caml-mode, or neocaml) and provides error navigation, type information display, code generation through the "destruct" feature, and enhanced navigation between language constructs.

Notable Activity:

  • ocaml-eglot 1.0.0 release bringing LSP to Emacs
  • Subsequent releases 1.1.0 and 1.2.0 adding flycheck support and Emacs 30.1 compatibility
  • Active development replacing maintenance-only merlin.el

Visual Studio Code Plugin

We're happy to announce that the Visual Studio Code editor plugin now integrates seamlessly with Dune package management! This is an important milestone for Dune package management, and if you haven't tried it, or have been waiting for it to mature, now is a great time to get started!

Development continues on improving the OCaml VSCode editor plugin experience. For example, when using opam to manage your project's dependencies and ocaml-lsp-server is not found in the opam switch, the plugin will now prompt users to install it.

Notable Activity:

  • Automatically installing/updating ocaml-lsp-server (#1725)
  • Automatically configuring dune package management (#1791)

Documentation Tools

Roadmap: Share / (W25) Generate Documentation

Odoc

Odoc 3.1.0 continues to refine the modern documentation experience introduced with Odoc 3.0. The cross-package linking system and multimedia support capabilities help teams create comprehensive and discoverable documentation for complex systems.

The improved documentation tooling addresses ecosystem discoverability and maintainability. The ability to generate interconnected documentation across multiple packages makes large OCaml codebases more accessible for new team members and external collaborators.

Work continues on integrating Odoc 3.x with the OCaml.org documentation pipeline to provide a unified documentation experience across the ecosystem. As of July 2025, Odoc 3 is now live on OCaml.org, bringing the new features to the entire package ecosystem. The improved pipeline addresses dependency complexities by using new tooling that archives and restores opam packages, eliminating redundant builds that previously occurred thousands of times.

Notable Activity:

Maintained by: Jon Ludlam (@jonludlam, Tarides), Daniel Bünzli (@dbuenzli), Jules Aguillon (@julow, Tarides), Paul-Elliot Anglès d'Auriac (@panglesd, Tarides), Emile Trotignon (@EmileTrotignon, Tarides, then Ahrefs)


Ppxlib

Ppxlib 0.36.1 refines the improvements introduced in version 0.36.0, which updated the internal AST to target OCaml 5.2. This enables ppx authors to leverage features from OCaml 5.2 while maintaining compatibility with OCaml 4.08.0 and newer.

The update includes changes to the representation of functions, and package authors are encouraged to consult the upgrade guide as some ppxes may require updates.

Notable Activity:

Maintained by: Patrick Ferris (@patricoferris)


OCaml 5.4.0

OCaml 5.4.0-beta1 provides early access to upcoming compiler improvements and serves as a validation point for the ecosystem. The beta release allows forward-looking projects to begin testing compatibility with the new version while the broader ecosystem prepares for the eventual stable release.

The continued parallel maintenance of OCaml 4.14 LTS ensures that projects with longer upgrade cycles maintain access to critical updates without forced compiler upgrades. This dual-track approach provides flexibility for organizations with different risk tolerance levels.

Notable Activity:


Utop

Utop 2.16.0 adds OCaml 5.4 support, restores backtrace functionality, improves preprocessor and Emacs integration, and relocates configuration files to a dedicated utop subdirectory.

Notable Activity:


We are seeing continued progress toward making OCaml development more accessible and productive. The maturation of Dune package management, stability improvements in opam 2.4.0, and enhanced editor support provide a solid foundation for teams adopting OCaml or expanding their existing OCaml usage.