Extending Dune With Package Management

Does this work reliably now? i.e. in the new 2.1.0~alpha release? The last time I tried using opam lock it was done using exports/imports stuff and it never worked for me. I would export it and try to build the same project in another pc and it wouldn’t work. So I switched over to esy. So far am happy with it.

The new behavior in 2.1 works pretty well for me. I’ll say that even the older opam lock plugin for versions before 2.1.0 have been working pretty well in my experience. I haven’t felt the need to use export/imports and have been relying on the opam-lock plugin wherever i needed lockfiles.


Dune can tell you which libraries are missing, but it cannot tell you which packages need to be installed. It can make a best effort guess, but it’s certainly not enough to be 100% reliable like the other tools mentioned in this thread. You still need to specify package dependencies either using opam or the dune-project file.


I started using opam lockfiles late last year. IME, yes, the tooling has done what I’ve expected.

1 Like