opam 2.2.0~alpha2
Feedback on this post is welcomed on Discuss!
We are happy to announce the second alpha 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 an alpha. so we invite users to test it for previously unnoticed bugs to head towards the stable release.
Windows Support
The first alpha came with native Windows compatibility. This second alpha comes with a simpler initialisation for Windows: we no longer rely on an already present Cygwin UNIX-like environment for Windows as a compatibility layer. During initialisation, opam now proposes to embed its own fully managed Cygwin install.
The main opam-repository
Windows compliance is still a work in progress. We
recommend using an existing, compatible
repository (originally
from @fdopen) and 32/64 bit mingw-w64
packages (by
@dra27).
How to Test opam on Windows
This alpha requires a preexisting Cygwin installation for compiling opam.
- Check that you have all dependencies installed:
autoconf
,make
,patch
,curl
- MinGW compilers:
mingw64-x86_64-gcc-g++
,mingw64-i686-gcc-g++
- 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
make cold
- A coffee later, you now have an opam executable!
- Start your preferred Windows terminal (
cmd
orPowerShell
), and initialise opam with the Windows sunset repository:
opam init 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.
Hint: if you use the MinGW compiler, don't forget to add to your
PATH
the path tolibc
dlls (usuallyC:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\bin
). You can also compile opam withmake cold CONFIGURE_ARGS=--with-private-runtime
, and if you change opam's location, don't forget to copyOpam.Runtime.amd64
(orOpam.Runtime.i386
) with it.
Updates & Fixes
opam var
now has a more informative error message in case of package variableopam lint
: update Error 29 on package variables on filters to check alsoconflicts:
fieldopam admin lint
cleans output when called not from a terminalconfigure
throws an error if no complementary compiler is found on Windows
Try It!
In case you plan a possible rollback, you may want to first backup your
~/.opam
directory.
The upgrade instructions are unchanged:
-
Either from binaries, run
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.2.0~alpha2"
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.