Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

confusing dependency error message (what is the meaning of '→'?) #6206

Closed
sanette opened this issue Sep 21, 2024 · 2 comments
Closed

confusing dependency error message (what is the meaning of '→'?) #6206

sanette opened this issue Sep 21, 2024 · 2 comments

Comments

@sanette
Copy link

sanette commented Sep 21, 2024

Hi

trying to install (for instance) tsdl.0.9.8 on ocaml 5.2:

$ opam install tsdl.0.9.8
[ERROR] Package conflict!
  * No agreement on the version of ocaml:
    - (invariant) → ocaml-base-compiler = 5.2.0 → ocaml = 5.2.0
    - tsdl = 0.9.8 → ctypes < 0.21.0 → ocaml < 4.03.0

Looking up ctypes.0.20.1 I see

depends      "ocaml" {>= "4.03.0" & < "5.2"}

which explains why it won't install on ocaml 5.2. But what is the meaning of the message
- tsdl = 0.9.8 → ctypes < 0.21.0 → ocaml < 4.03.0 ? Requiring ocaml < 4.03 is absurd, since it will work fine with (for instance) ocaml 5.0.
I find this quite confusing

<include here the output of `opam config report`, if applicable>
# opam config report
# opam-version         2.2.1
# self-upgrade         no
# system               arch=x86_64 os=linux os-distribution=neon os-version=22.04
# solver               builtin-mccs+glpk
# install-criteria     -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed
# upgrade-criteria     -removed,-count[avoid-version,changed],-count[version-lag,solution],-count[missing-depexts,changed],-new
# jobs                 3
# repositories         1 (http), 1 (local), 2 (version-controlled) (default repo at 0496562931aba14e8095ac8eaf3bf067c2ed18a6)
# pinned               0
# current-switch       5.2.0
# invariant            ocaml-base-compiler = 5.2.0 | ocaml-system = 5.2.0
# compiler-packages    ocaml-base-compiler.5.2.0, ocaml-options-vanilla.1
# ocaml:native         true
# ocaml:native-tools   true
# ocaml:native-dynlink true
# ocaml:stubsdir       /home/san/.opam/5.2.0/lib/ocaml/stublibs:/home/san/.opam/5.2.0/lib/ocaml
# ocaml:preinstalled   false
# ocaml:compiler       5.2.0

@kit-ty-kate
Copy link
Member

The meaning of the arrow is "depends on", however this is indeed a bug to the way this is displayed, but it has been fixed in #6106 and is available in opam 2.3.0~alpha1.

If you want to test the alpha you can do so using:

bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --version 2.3.0~alpha1"

Since this is already fixed, i'll close this as a duplicate of #4373. Thanks for the report

@kit-ty-kate kit-ty-kate closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2024
@sanette
Copy link
Author

sanette commented Sep 22, 2024

thanks! I'm sorry I didn't see this was a duplicate

Indeed the new opam 2.3.0~alpha1 has a good error message:

 $ opam install tsdl.0.9.8
[ERROR] Package conflict!
  * No agreement on the version of ocaml:
    - (invariant) → ocaml-base-compiler = 5.2.0 → ocaml = 5.2.0
    - tsdl = 0.9.8 → ctypes < 0.21.0 → ocaml < 5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants