Suppressing useless opam message?

Every time I do an opam upgrade, I see this:

The following newer versions couldn't be installed:
  - base-bytes.legacy is not available because your system doesn't comply with
    ocaml-version < "4.02.0".

What is causing opam to want to install base-bytes.legacy? And how can I get rid of this message?

A wild guess, is that opam is trying to update base-bytes.legacy that are already installed, so, probably, removing the package will solve the issue.

Apparently not.

$ opam remove base-bytes.legacy
[ERROR] base-bytes.legacy is not available because your system doesn't comply
        with ocaml-version < "4.02.0".
1 Like

Okay, as no one seems to have a guess on what is going on, how might I try debugging this? Is there any good way to learn what wishes to install the package for example, or otherwise to debug the operation of opam in these circumstances?

base-bytes.legacy is a compatibility base-bytes library for opam versions under 4.02.0. Some packages depend on base-bytes, and I’m guessing to be able to use it on old versions, the legacy version will need to be installed. If the version is >= 4.02.0 afaik it should install base-bytes.base. Are you having problems with your installs other than the warnings?

Having no problems at all. Everything works fine. I don’t understand why this is happening, and I don’t understand how to debug it to figure it out. :frowning:

This is not really a bug, but rather due to the fact that version numbers are abused for base-bytes: it has two versions, base and legacy. The latter is technically higher, so opam upgrade, following its semantics, will attempt to “upgrade” to the newer version, and notify you that it couldn’t be done.

Sorry for the noise, there is really nothing to worry about. Recent opam versions should hide these messages unless put in verbose mode, too.

Ah. I tend to do updates in verbose mode in order to make sure I’m not missing anything going on.

Given this situation, is it actually correct that “base” is a lower version than “legacy”? One would imagine that one would prefer to be on base on OCaml systems above some version number and on legacy below that version number, and that “legacy” would be the lower version, and what one would continue using until one could upgrade one’s OCaml compiler…

Well the versions base and legacy don’t have a built-in meaning, base just happens to be before alphabetically. If that’s a problem the packagers should name them e.g. 0-legacy and 1-base (or even ~legacy and base, so that any numbered version would be between the two)