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
xvw@xvw-thinkpad-x1 ~/Projects/tarides/merlin handle-destruct-in-function-arg opam install merlin.4.14-502~preview
The following actions will be performed:
=== install 3 packages
∗ dot-merlin-reader 4.9 [required by merlin]
∗ merlin 4.14-502~preview
∗ merlin-lib 4.14-502~preview [required by merlin]
Proceed with ∗ 3 installations? [y/n] y
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved dot-merlin-reader.4.9 (cached)
⬇ retrieved merlin.4.14-502~preview, merlin-lib.4.14-502~preview (https://opam.ocaml.org/cache)
∗ installed merlin-lib.4.14-502~preview
[ERROR] The compilation of dot-merlin-reader.4.9 failed at "dune build -p dot-merlin-reader -j 7".
#=== ERROR while compiling dot-merlin-reader.4.9 ==============================#
# context 2.2.0~beta1 | linux/x86_64 | ocaml.5.2.0 | https://opam.ocaml.org#f5e16063
# path ~/Projects/tarides/merlin/_opam/.opam-switch/build/dot-merlin-reader.4.9
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p dot-merlin-reader -j 7
# exit-code 1
# env-file ~/.opam/log/dot-merlin-reader-519987-d9efa9.env
# output-file ~/.opam/log/dot-merlin-reader-519987-d9efa9.out
### output ###
# Error: This expression has type
# [...]
# list"
# Type
# "Merlin_dot_protocol.Directive.include_path" =
# "[ `B of string
# | `CMI of string
# | `CMT of string
# | `H of string
# | `S of string ]"
# is not compatible with type
# "[< `B of string | `CMI of string | `CMT of string | `S of string ]"
# The second variant type does not allow tag(s) "`H"
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build dot-merlin-reader 4.9
└─
┌─ The following changes have been performed (the rest was aborted)
│ ∗ install merlin-lib 4.14-502~preview
└─
The former state can be restored with:
/usr/bin/opam switch import "/home/xvw/Projects/tarides/merlin/_opam/.opam-switch/backup/state-20240408104518.export"
And @kit-ty-kate suggested I run this command, which works:
I believe part of the problem is your invariant is too open. You currently have:
ocaml >= 4.05.0
which allows your current switch to be downgraded if the solver wants it to.
My guess as to why it happens is that opam doesn't currently work very well when there is a combination of such an open invariant and a compiler package that has the avoid-version flag. I'll have a closer look at it after the release of opam 2.2.0
We discussed this issue during today's dev meeting. We have discussed of several possible fixes and will have a go at it once we have more time after the release of 2.2.0.
Trying to use
merlin
(in preview for5.2.0
), to work onmerlin
, I was forced to do a bit of manual installation:When I try to install merlin on a local-switch on
5.2.0+beta1
withOPAM 2.2.0~beta1
I face to:If I try to be more explicit:
I face to
And @kit-ty-kate suggested I run this command, which works:
But as the solver seems capricious, he offered to fill in a ticket. If I can provide any further information, please don't hesitate!
OPAM report
The text was updated successfully, but these errors were encountered: