You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Opam version 2.1.0~alpha, when using a switch with ocaml-variants, opam seems to make no effort to preserve the type of variant installed. For instance,
in which opam suggests a switch from a +afl variant to a +statistical-memprof variant in addition to the necessary change to the base compiler version.
This presumably happens because the version of ocaml-variants is opaque to Opam, and so 4.07+afl and 4.07+statistical-memprof are equally valid solutions. My expectation is that users would want the type of OCaml compiler variant they have installed to be preserved if at all possible, using some sort of "invariant" along the lines of:
ocaml-variants = .*+afl
Since this isn't a valid Opam constraint, it's not possible to set it as a switch invariant. The solution here may be to change the way ocaml-variants works to avoid overloading the version string as it does (perhaps ocaml-variants-afl.4.09 rather than ocaml-variants.4.09+afl?).
The text was updated successfully, but these errors were encountered:
Your diagnostic is correct, the way these variants are handled is a bit of a hack in the opam-repository, and your result is the downside of it. We have better ways of specifying compiler options and variants in the works, but nothing fully designed yet.
In your case, you probably want to set the switch base (or invariant in 2.1) so that opam won't suggest changing its version at all.
On Opam version
2.1.0~alpha
, when using a switch withocaml-variants
,opam
seems to make no effort to preserve the type of variant installed. For instance,in which
opam
suggests a switch from a+afl
variant to a+statistical-memprof
variant in addition to the necessary change to the base compiler version.This presumably happens because the version of
ocaml-variants
is opaque to Opam, and so4.07+afl
and4.07+statistical-memprof
are equally valid solutions. My expectation is that users would want the type of OCaml compiler variant they have installed to be preserved if at all possible, using some sort of "invariant" along the lines of:Since this isn't a valid Opam constraint, it's not possible to set it as a switch invariant. The solution here may be to change the way
ocaml-variants
works to avoid overloading the version string as it does (perhapsocaml-variants-afl.4.09
rather thanocaml-variants.4.09+afl
?).The text was updated successfully, but these errors were encountered: