Skip to content

Make the opam library only available on a matching opam version #6615

Description

@kit-ty-kate

Currently any versions of the opam libraries can be used with any versions of the opam binary/opamroot.
Using the wrong versions can cause problem in some cases, especially when using opam-state and above, when the library makes assumptions about the formats used. Using different versions also sometimes requires to rebuild the cache, slowing down actions unexpectedly.

As we are planning to change some internal formats in #6327, it would be nice to avoid this problem this time around.
My proposal would be to add the following:

available: opam-version >= "2.4" & opam-version < "2.5"

on opam-repository, opam-state and opam-client, to be bumped every major releases.

opam-core, opam-format and opam-solver are probably fine without matching versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions