Feedback on this post is welcomed on Discuss!
We are happy to announce the first beta release of opam 2.2.0. It contains some fixes and a new feature for Windows. You can view the full list in the release note.
This version is a beta, we invite users to test it to spot previously unnoticed bugs as we head towards the stable release.
Major change: Check and advertise to use Git for Windows
Opam 2.2 is based on a Cygwin installation (previously installed, or managed
internally by opam). Cygwin's Git has three known usability issues when used
outside a Cygwin environment: it uses a different set of trusted certificate
authorities, has its own Credential Manager and potentially uses a separate Git
configuration. We therefore recommend using Git for
Windows either installed manually or via
opam init, opam checks for available Git(s), and asks the user to choose
one of the available, or to rerun
opam init after installing another Git.
Other noteworthy changes
- When compiling opam on Windows with MinGW, the resulting opam binary now contains
libstdc++instead of requiring the DLL to be distributed alongside it or present in the environment
opam envcontaining carriage return on Cygwin -
eval $(opam env)now works from a Cygwin bash terminal
- Remove stray comments from
cmdopam env output
./configure --enable-staticto compile the opam binary statically on Linux
- Fix debug logs showing up regardless of verbosity on macOS 12.7.1 / 13.6.3 / 14.2 and FreeBSD
- Upgrade to, and require mccs >= 1.1+17
Various other improvements were made and bugs were fixed. API changes are denoted in the release note linked above. This release also includes PRs improving the documentation and improving and extending the tests.
How to Test opam on Windows
If you're feeling adventurous, you can use the experimental pre-built binary for Windows available here.
Otherwise you can compile opam yourself using the following steps:
This beta requires a preexisting Cygwin installation for compiling opam.
- Check that you have all dependencies installed:
- MinGW compilers:
- Or if you want to use the MSVC port of OCaml, you'll need to install Visual Studio or Visual Studio Build Tools
- Download & extract the opam archive
- In the directory, launch
- A coffee later, you now have an opam executable!
- Start your preferred Windows terminal (
PowerShell), and initialise opam with the Windows sunset repository:
opam init git+https://github.com/ocaml-opam/opam-repository-mingw
From here, you can try to install the sunset repository packages. If you find any bugs, please submit an issue. It will help opam-repository maintainers to add Windows repository packages into the main repository.
In case you plan a possible rollback, you may want to first backup your
The upgrade instructions are unchanged:
Either from binaries: run
bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --version 2.2.0~beta1"
or download manually from the Github "Releases" page to your PATH.
Or from source, manually: see the instructions in the README.
You should then run:
opam init --reinit -ni
Please report any issues to the bug-tracker.
Thanks for trying this new release out, and we hope you will enjoy the new features!