dune icon indicating copy to clipboard operation
dune copied to clipboard

pkg: workaround to avoid unstable compilers

Open gridbugs opened this issue 1 year ago • 0 comments

Fixes https://github.com/ocaml/dune/issues/10592.

Solves an issue where the solver would choose unstable releases of the compiler. When the latest version of the "ocaml" package can only be satisfied by unstable versions of "ocaml-variants", dune would still include this unstable compiler in package solutions. This leads to users being given unstable versions of the compiler by default. This is only a problem because dune doesn't yet fully implement the avoid-version flag, and compiler packages are released under the assumption that the solver respects this flag.

The workaround introduced in this change is to determine the latest stable version of "ocaml-base-compiler" (the latest version lacking the avoid-version flag), and have the solver prefer versions of the "ocaml" package that are no later than this version.

gridbugs avatar Jun 25 '24 01:06 gridbugs