Hello! The Tarides team is writing to share updates on Dune package management.
Context
Dune package management aims to improve some developer workflows by simplifying the use of opam dependencies in projects built with Dune. To learn more, see the tutorial, OCaml Package Management With Dune.
It’s been too long since we shared an update, especially considering our gratitude for all the excellent feedback we have received. But Dune contributors have been hard at work fixing issues and solving tricky architectural snags present in the previous iteration.
Available now
Thanks to many contributors, the following functionalities are available on Linux and MacOS in the latest release of Dune (3.22):
- managing dependencies published in opam repositories (the vast majority of opam packages are supported, but not all)
- pinning dependencies (recursively)
- support for custom opam-repositories (which, for example, can be used for OxCaml projects by following this documented configuration recipe)
- locking dependency versions, to provide a reproducible environment for developers and CI (portably, across supported platforms)
- support for managing select developer tooling (shaky, but usable on the happy path)
- most recently, we’ve added support for the relocatable compiler
Additionally, the following supporting utilities are available:
- a binary distribution for supported platforms offering nightly builds and released versions
- setup-dune, a GitHub action enabling quick and easy CI for projects that use dune package management
Current status and focus
Thanks to several regular users in the community and usage in many of the CI systems we maintain, we are gathering ongoing feedback and exercising the core functionality. However, our testing has shown the features are not yet mature enough to recommend wider use, beyond eager and early adopters. Consequently, all the documentation warns that this functionality is experimental and subject to change.
We are currently focused on maturing package management beyond its experimental status. This requires reworking the developer tooling support, supporting packages that use symlinks, and ensuring we can dogfood Dune package management in its own development. The best place to look for what we have planned in this current phase is Non-experimental package management · Milestone #62 · ocaml/dune.
Next up
After maturing the core functionality, we will turn our focus to extending the supported platforms and improving ecosystem integration. This work will include adding support for Windows, improving cross-compilation, supporting advanced vendoring workflows, and integrating Dune package management into the opam-ci. More updates and more accessible planning will follow.
Input and contributions
Please reach out if you find this work interesting and would like to help!