[ANN] opam 2.2.1

Hi everyone,

We are pleased to announce the release of opam 2.2.1.

We’ve fixed a couple of regressions and would like to encourage users of opam 2.2 to upgrade:

  • Fix a regression in opam install --deps-only where the direct dependencies were not set as root packages
  • Fix a regression when fetching git packages where the resulting git repository could lead to unexpected outputs of git commands, by disabling shallow clone by default except when fetching an opam repositories
  • Mitigate curl/curl#13845 by falling back from --write-out to --fail
    if exit code 43 is returned by curl. In particular, this fixes opam init when run from cmd/PowerShell on Windows 11 23H2

You’ll find more information in the release blog post .


To upgrade, simply run for Unix systems

bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --version 2.2.1"

from PowerShell for Windows systems

Invoke-Expression "& { $(Invoke-RestMethod https://raw.githubusercontent.com/ocaml/opam/master/shell/install.ps1) }"

<> <> The opam team <> <> :camel:

14 Likes

Windows 11 users are strongly encouraged to upgrade to opam 2.2.1 for the mitigation for curl 8.8.0.

opam 2.2.1 is also available via winget, with winget upgrade OCaml.opam. The OCaml.opam winget package downloads the opam binary from GitHub releases page (thanks to @prometheansacrifice, for contributing the original package!), so installing via winget is functionally equivalent to using our install.ps1 script.

4 Likes