ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.21k stars 348 forks source link

opam upgrade keeps wanting to recompile ocaml #6028

Closed emillon closed 2 weeks ago

emillon commented 2 weeks ago

Hi, I'm using 2.2.0~beta3 on linux. I'm encountering an issue where opam upgrade keeps wanting to recompile ocaml and ocaml-base-compiler.

This looks like:

$ opam update
$ opam upgrade
[...]
  ↻ ocaml                       4.14.1          [upstream or system changes]
  ↻ ocaml-base-compiler         4.14.1          [upstream or system changes]
[...]
Proceed with ↻ 141 recompilations? [y/n] y
[...]
$ opam update
$ opam upgrade
[...]
  ↻ ocaml                       4.14.1          [upstream or system changes]
  ↻ ocaml-base-compiler         4.14.1          [upstream or system changes]
[...]
Proceed with ↻ 141 recompilations? [y/n] n

opam remote has just the default http remote. Here's part of the output of opam config report:

# repositories         1 (http), 10 (version-controlled) (default repo at 5d6f1cf0)

Let me know what extra info I can provide.

OlivierNicole commented 2 weeks ago

I’m experiencing the same thing.

emillon commented 2 weeks ago

Hum that's weird, the behaviour disappeared. So maybe it's just something that somehow required 2 rebuilds?

kit-ty-kate commented 2 weeks ago

I was able to reproduce, i'm investigating

yannl35133 commented 2 weeks ago

It happened to me more than twice, but I can't reproduce it indefinitely either. Maybe it's twice per update of the repository. Also, this behaviour happens with a switch only containing the system compiler (5.2.0 in my case), which helps for testing since no compilation needs to happen.

kit-ty-kate commented 2 weeks ago

This will be fixed by https://github.com/ocaml/opam/pull/6029