[ANN] opam 2.6.0 is out!

Hi everyone,

We’re happy to announce the release of opam 2.6.0 and encourage all users to upgrade.

Note: the following section will recap the various major changes in opam 2.6.0 for anyone who haven’t already read the previous pre-release announcements. For those who did, note that nothing worth mentioning changed between 2.6.0~rc1 and the final 2.6.0.

What’s new? Some highlights:

  • :money_bag: For people using the shell hooks, this release changed the way PATH is kept up-to-date from opam taking priority over any other elements of PATH by making sure to always be in front, to replacing the directory managed by opam in-place, keeping the order asked by the user. To benefit from this, make sure opam init --reinit -ni was ran once after upgrading to this version (automatically done by our install script if it detects an existing opam installation). Thanks to @gridbugs for this contribution.

  • :wastebasket: Reduce the disk space usage of opam by removing the build directory as soon as possible and removing redundant archive caches. While the disk usage used by opam can be reduced over time while simply reinstalling packages, you can liberate some free GB in one go using opam clean --all-switches.

  • :high_speed_train: Improve performance drastically on certain file-systems (e.g. NTFS on Windows or IO constrained machines) by changing the format HTTP repositories such as opam.ocaml.org are stored in internally.

  • :envelope_with_arrow: Add root and rootexec sections to .install files to install files from the root prefix. Thanks to @WardBrian for this contribution.

  • :woman_technologist: Add a new --ignore-available-on argument to allow ignoring the available: field of certain packages. Thanks once-again to @WardBrian for this contribution.

  • :shuffle_tracks_button: opam now disable git gc/maintenance on repositories it maintains. This is because git spawns maintenance tasks in the background which creates/removes/modifies files and unaware opam processes can sometimes break on a race-condition when handling such a git repository.

  • :houses: When --safe is given, opam used to reset debug-level to 0. This is no longer the case. Consider updating your scripts accordingly.

  • :ocean: Many more UI additions and improvements, bug fixes, …

:open_book: You can read our blog post for more information about these changes and more, and for even more details you can take a look at the release note or the changelog.

Try it!

The upgrade instructions are unchanged:

For Unix systems

bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.6.0"

or from PowerShell for Windows systems

Invoke-Expression "& { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) } -Version 2.6.0"

Please report any issues to the bug-tracker.

Happy hacking,
<> <> The opam team <> <> :camel:

is the build directory kept when the build fails? (yes, i can re-run with -b but it is (very rarely) useful to be able to investigate immediately in case it was some race condition because of parallel builds)

yes of course, sorry if that wasn’t clear. Previously, successful build directories were removed at the end of the command and the only things that this changes regarding that directory is that the removal is done as soon as the package is installed. But if a package failed, the build directory will still be there to debug things.