Skip to content

Add the changelog for opam 2.4.0~alpha1 #3069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions data/changelog/opam/2025-04-18-opam-2-4-0-alpha1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: "opam 2.4.0~alpha1"
authors: [
"Raja Boujbel",
"Kate Deplaix",
"David Allsopp",
]
description: "Release of opam 2.4.0~alpha1"
tags: [opam, platform]
---

We are happy to announce the first alpha release of opam 2.4.0.

This version is an alpha, we invite users to test it to spot previously unnoticed bugs as we head towards the stable release.

## What’s new? Some highlights:

* 🐲 **On `opam init` the compiler** chosen for the default switch will **no longer be `ocaml-system`** ([#3509](https://github.com/ocaml/opam/issues/3509))
This was done because the system compiler (as-is your ocaml installed system wide, e.g. /usr/bin/ocaml) is known to be under-tested and prone to a variety of bugs and configuration issues.
Removing it from the default compiler allows new-comers a more smooth experience.
*Note: if you wish to use it anyway, you are always able to do it explicitly using `opam init --compiler=ocaml-system`*

* 🐪 GNU **`patch`** and the **`diff`** command are **no longer runtime dependencies**. Instead the OCaml `patch` library is used ([#6019](https://github.com/ocaml/opam/issues/6019), [#6052](https://github.com/ocaml/opam/issues/6052), [#3782](https://github.com/ocaml/opam/issues/3782), [ocaml/setup-ocaml#933](https://github.com/ocaml/setup-ocaml/pull/933))
Doing this we've removed some rarely used features of GNU Patch such as the support of [Context diffs](https://www.gnu.org/software/diffutils/manual/html_node/Example-Context.html).
The new implementation only supports [Unified diffs](https://www.gnu.org/software/diffutils/manual/html_node/Example-Unified.html) including the [git extended headers](https://git-scm.com/docs/diff-format), however file permission changes via said extended headers have no effect.

* ❄️ Add **Nix support** for **external dependencies (depexts)** by adding support for stateless package managers ([#5982](https://github.com/ocaml/opam/issues/5982)). *Thanks to [@RyanGibb](https://github.com/RyanGibb) for this contribution*

* 🪳 **Fix `opam install <local_dir>`** with and without options like `--deps-only` or `--show-action` having **unexpected behaviours** ([#6248](https://github.com/ocaml/opam/issues/6248), [#5567](https://github.com/ocaml/opam/issues/5567)) such as:
* reporting `Nothing to do` despite dependencies or package not being up-to-date
* asking to install the wrong dependencies

* 🌊 Many more UI additions and improvements, bug fixes, performance improvements, …


📖 You can read our [blog post](https://opam.ocaml.org/blog/opam-2-4-0-alpha1/) for more information about these changes and more, and for even more details you can take a look at the [release note](https://github.com/ocaml/opam/releases/tag/2.4.0-alpha1) or the [changelog](https://github.com/ocaml/opam/blob/2.4.0-alpha1/CHANGES).

## Try it!

The upgrade instructions are unchanged:

For Unix systems
```sh
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.4.0~alpha1"
```
or from PowerShell for Windows systems
```sh
Invoke-Expression "& { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) } -Version 2.4.0~alpha1"
```
Please report any issues to the [bug-tracker](https://github.com/ocaml/opam/issues).
Loading