opam 2.0 Beta5 is out!
After a few more months brewing, we are pleased to announce a new beta release of opam. With this new milestone, opam is reaching feature-freeze, with an expected 2.0.0 by the beginning of next year.
This version brings many new features, stability fixes, and big improvements to the local development workflows.
What's new
The features presented in past announcements: local switches, in-source package definition handling, extended dependencies are of course all present. But now, all the glue to make them interact nicely together is here to provide new smooth workflows. For example, the following command, if run from the source tree of a given project, creates a local switch where it will restore a precise installation, including explicit versions of all packages and pinnings:
opam switch create ./ --locked
this leverages the presence of opam.locked
or <name>.opam.locked
files,
which are valid package definitions that contain additional details of the build
environment, and can be generated with the
opam-lock
plugin (the lock
command may
be merged into opam once finalised).
But this new beta also provides a large amount of quality of life improvements,
and other features. A big one, for example, is the integration of a built-in
solver (derived from mccs
and
glpk
). This means that the opam
binary
works out-of-the box, without requiring the external
aspcud
solver, and on all
platforms. It is also faster.
Another big change is that detection of architecture and OS details is now done
in opam, and can be used to select the external dependencies with the new format
of the depexts:
field, but also to affect dependencies or build flags.
There is much more to it. Please see the changelog, and the updated manual.
How to try it out
Our warm thanks for trying the new beta and reporting any issues you may hit.
There are three main ways to get the update:
- The easiest is to use our pre-compiled binaries. This script will also make backups if you migrate from 1.x, and has an option to revert back:
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
This uses the binaries from https://github.com/ocaml/opam/releases/tag/2.0.0-beta5
- Another option is to compile from source, using an existing opam installation. Simply run:
opam update; opam install opam-devel
and follow the instructions (you will need to copy the compiled binary to your PATH).
-
Compiling by hand from the inclusive source archive, or from the git repo. Use
./configure && make lib-ext && make
if you have OCaml >= 4.02.3 already available;make cold
otherwise.If the build fails after updating a git repo from a previous version, try
git clean -fdx src/
to remove any stale artefacts.
Note that the repository format is different from that of opam 1.2. Opam 2 will be automatically redirected from the opam-repository to an automatically rewritten 2.0 mirror, and is otherwise able to do the conversion on the fly (both for package definitions when pinning, and for whole repositories). You may not yet contribute packages in 2.0 format to opam-repository, though.
What we need tested
We are interested in all opinions and reports, but here are a few areas where your feedback would be specially useful to us:
- Use 2.0 day-to-day, in particular check any packages you may be maintaining. We would like to ensure there are no regressions due to the rewrite from 1.2 to 2.0.
- Check the quality of the solutions provided by the solver (or conflicts, when applicable).
- Test the different pinning mechanisms (rsync, git, hg, darcs) with your
project version control systems. See the
--working-dir
option. - Experiment with local switches for your project (and/or
opam install DIR
). Give us feedback on the workflow. Useopam lock
and share development environments. - If you have any custom repositories, please try the conversion to 2.0 format
with
opam admin upgrade --mirror
on them, and use the generated mirror. - Start porting your CI systems for larger projects to use opam 2, and give us
feedback on any improvements you need for automated scripting (e.g. the
--json
output).
About OCamlPro:
OCamlPro is a R&D lab founded in 2011, with the mission to help industrial users benefit from experts with a state-of-the-art knowledge of programming languages theory and practice.
- We provide audit, support, custom developer tools and training for both the most modern languages, such as Rust, Wasm and OCaml, and for legacy languages, such as COBOL or even home-made domain-specific languages;
- We design, create and implement software with great added-value for our clients. High complexity is not a problem for our PhD-level experts. For example, we helped the French Income Tax Administration re-adapt and improve their internally kept M language, we designed a DSL to model and express revenue streams in the Cinema Industry, codename Niagara, and we also developed the prototype of the Tezos proof-of-stake blockchain from 2014 to 2018.
- We have a long history of creating open-source projects, such as the Opam package manager, the LearnOCaml web platform, and contributing to other ones, such as the Flambda optimizing compiler, or the GnuCOBOL compiler.
- We are also experts of Formal Methods, developing tools such as our SMT Solver Alt-Ergo (check our Alt-Ergo Users' Club) and using them to prove safety or security properties of programs.
Please reach out, we'll be delighted to discuss your challenges: contact@ocamlpro.com or book a quick discussion.
Most Recent Articles
2024
- opam 2.3.0 release!
- Optimisation de Geneweb, 1er logiciel français de Généalogie depuis près de 30 ans
- Alt-Ergo 2.6 is Out!
- Flambda2 Ep. 3: Speculative Inlining
- opam 2.2.0 release!
- Flambda2 Ep. 2: Loopifying Tail-Recursive Functions
- Fixing and Optimizing the GnuCOBOL Preprocessor
- OCaml Backtraces on Uncaught Exceptions
- Opam 102: Pinning Packages
- Flambda2 Ep. 1: Foundational Design Decisions
- Behind the Scenes of the OCaml Optimising Compiler Flambda2: Introduction and Roadmap
- Lean 4: When Sound Programs become a Choice
- Opam 101: The First Steps
2023
- Maturing Learn-OCaml to version 1.0: Gateway to the OCaml World
- The latest release of Alt-Ergo version 2.5.1 is out, with improved SMT-LIB and bitvector support!
- 2022 at OCamlPro
- Autofonce, GNU Autotests Revisited
- Sub-single-instruction Peano to machine integer conversion
- Statically guaranteeing security properties on Java bytecode: Paper presentation at VMCAI 23
- Release of ocplib-simplex, version 0.5