Skip to content

Wrong formula in conflict message #2229

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

Closed
AltGr opened this issue Jun 29, 2015 · 1 comment
Closed

Wrong formula in conflict message #2229

AltGr opened this issue Jun 29, 2015 · 1 comment

Comments

@AltGr
Copy link
Member

AltGr commented Jun 29, 2015

$ mkdir -p /tmp/p; echo 'opam-version: "1.2" depends: "ocp-indent" { >= "2" | < "0.1" }' >/tmp/p/opam
$ opam pin add test-conflicts.1 /tmp/p
[...]
The following dependencies couldn't be met:
  - test-conflicts -> ocp-indent (< 0.1 & >= 2)
Your request can't be satisfied:
  - ocp-indent<0.1 is not available because the package is pinned to /home/lg/ocamlpro/ocp-indent, version 1.5.1.
  - ocp-indent>=2 is not available because the package is pinned to /home/lg/ocamlpro/ocp-indent, version 1.5.1.

The message refers to (< 0.1 & >= 2) while it was an | in the original constraint. Otherwise it's fine (in particular the two reasons following). This is probably the function in cause ; but it's quite complex already (it gathers all dependency chains returned by Dose in order to aggregate them for a concise message).
It may be difficult to retrieve the original logical operator, as Dose returns a list of chains without connection between them.

@kit-ty-kate
Copy link
Member

This has been fixed at some point in the past 9 years. As of 2.3.0 opam outputs either:

[ERROR] Package conflict!
  * Missing dependency:
    - test-conflicts → ocp-indent >= 2
    no matching version

No solution found, exiting

or

[ERROR] Package conflict!
  * Missing dependency:
    - test-conflicts → ocp-indent >= 1.8
    not available because the package is pinned to version 1.5.1

No solution found, exiting

Depending on the version of ocp-indent installed.

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

No branches or pull requests

3 participants