opam-lib 1.3 available
The package for opam-lib version 1.3 has just been released in the official
opam repository. There is no release of
opam with version 1.3, but this is an intermediate
version of the library that retains compatibility of the file formats with
The purpose of this release is twofold:
- provide some fixes and enhancements over opam-lib 1.2.2. For example, 1.3
has an enhanced
- be a step towards migration to opam-lib 2.0.
This version is compatible with the current stable release of opam (1.2.2), but dependencies have been updated so that you are not (e.g.) stuck on an old version of ocamlgraph.
Therefore, I encourage all maintainers of tools based on opam-lib to migrate to 1.3.
A note on plugins: when you write opam-related tools, remember that by setting
flags: pluginin their definition and installing a binary named
opam-toolname, you will enable the users to install package
toolnameand run your tool with a single
If you need to migrate from 1.2 to 1.3, these tips may help:
there are now 6 different ocamlfind sub-libraries instead of just 4:
formatcontains the handlers for opam types and file formats, has been split out from the core library, while
statehandles the state of a given opam root and switch and has been split from the
OpamMiscis gone and moved into the better organised
OpamStd, with submodules for
OpamGlobalsis gone too, and its contents have been moved to:
OpamConsolefor the printing, logging, and shell interface handling part
OpamXxxConfigmodules for each of the libraries for handling the global configuration variables. You should call the respective
initfunctions, with the options you want to set, for proper initialisation of the lib options (and handling the
OpamRepositoryPath, and part of the
opam-lib 2.0 ?
The development version of the opam-lib (
2.0~alpha5 as of writing) is already
available on opam. The name has been changed to provide a finer granularity, so
it can actually be installed concurrently -- but be careful not to confuse the
ocamlfind package names (
opam-lib.format for 1.3 vs
opam-format for 2.0).
The provided packages are:
opam-file-format: now separated from the opam source tree, this has no dependencies and can be used to parse and print the raw opam syntax.
opam-core: the basic toolbox used by opam, which actually doesn't include the opam specific part. Includes a tiny extra stdlib, the engine for running a graph of processes in parallel, some system handling functions, etc. Depends on ocamlgraph and re only.
opam-format: defines opam data types and their file i/o functions. Depends just on the two above.
opam-solver: opam's interface with the dose3 library and external solvers.
opam-repository: fetching repositories and package sources from all handled remote types.
opam-state: handling of the opam states, at the global, repository and switch levels.
opam-client: the client library, providing the top-level operations (installing packages...), and CLI.
opam-devel: this packages the development version of the opam tool itself, for bootstrapping. You can install it safely as it doesn't install the new
opamin the PATH.
The new API can be also be browsed ; please get in touch if you have trouble migrating.
Au sujet d'OCamlPro:
OCamlPro is a R&D lab founded in 2011, with the mission to help industrial users benefit from state-of-the art programming languages like OCaml and Rust.
We design, create and implement custom ad-hoc software for our clients. We also have a long experience in developing and maintaining open-source tooling for OCaml, such as Opam, TryOCaml, ocp-indent, ocp-index and ocp-browser, and we contribute to the core-development of OCaml, notably with our work on the Flambda optimizer branch.
Another area of expertise is that of Formal Methods, with tools such as our SMT Solver Alt-Ergo (check our Alt-Ergo Users'). We also provide vocational trainings in OCaml and Rust, and we can build courses on formal methods on-demand. Do not hesitate to reach out by email: email@example.com.