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

Unhelpful conflict messages #4373

Closed
kit-ty-kate opened this issue Sep 24, 2020 · 24 comments · Fixed by #4982 or #6106
Closed

Unhelpful conflict messages #4373

kit-ty-kate opened this issue Sep 24, 2020 · 24 comments · Fixed by #4982 or #6106

Comments

@kit-ty-kate
Copy link
Member

kit-ty-kate commented Sep 24, 2020

*** Please add your unhelpful conflict message to this discussion ***


While trying to install expect.0.0.6 on OCaml 4.12:

[ERROR] Package conflict!
No solution found, exiting
  * No agreement on the version of ocaml:
    - (invariant) -> ocaml-variants = 4.12.0+trunk -> ocaml >= 4.12.0
    - expect >= 0.0.6 -> batteries -> ocaml < 4.00.0
    You can temporarily relax the switch invariant with `--update-invariant'

I would have expected:

    - expect >= 0.0.6 -> batteries -> ocaml < 4.12.0

as the latest version of batteries indicates.

@kit-ty-kate
Copy link
Member Author

Similar here for ppx_expect.v0.14.0:

[ERROR] Package conflict!
No solution found, exiting
  * No agreement on the version of ocaml:
    - (invariant) -> ocaml-variants = 4.12.0+trunk -> ocaml >= 4.12.0
    - ppx_expect >= v0.14.0 -> ppxlib >= 0.11.0 -> ocaml < 4.10.0
    You can temporarily relax the switch invariant with `--update-invariant'

I would have expected an extra step:

    - ppx_expect >= v0.14.0 -> ppxlib >= 0.11.0 -> ocaml-migrate-parsetree >= 2.0.0 -> ocaml < 4.12

@AltGr
Copy link
Member

AltGr commented Oct 13, 2020

Ok, I see what's happening, we just need to refine how information is filtered out. Here is the message with more info and less filtering:

  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.07)
    You can temporarily relax the switch invariant with `--update-invariant'
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.07+2)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.08.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.08.2)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.09.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.09.2)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.10.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.10.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.10.2)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.11.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.12.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.5.0) → ocaml < 4.01.0 (ocaml.4.00.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.5.0) → ocaml < 4.01.0 (ocaml.4.00.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.1.0) → ocaml < 4.02.0 (ocaml.4.01.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.3.0) → ocaml < 4.03.0 (ocaml.4.02.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.3.0) → ocaml < 4.03.0 (ocaml.4.02.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.3.0) → ocaml < 4.03.0 (ocaml.4.02.2)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.3.0) → ocaml < 4.03.0 (ocaml.4.02.3)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.8.0) → ocaml < 4.07.0 (ocaml.4.06.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.8.0) → ocaml < 4.07.0 (ocaml.4.06.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.9.0) → ocaml < 4.08.0 (ocaml.4.07.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.10.0) → ocaml < 4.10.0 (ocaml.4.08.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.10.0) → ocaml < 4.10.0 (ocaml.4.09.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.10.0) → ocaml < 4.10.0 (ocaml.4.09.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.3.1.0) → ocaml < 4.12.0 (ocaml.4.11.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.3.1.0) → ocaml < 4.12.0 (ocaml.4.11.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.3.1.0) → ocaml < 4.12.0 (ocaml.4.11.2)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.07+1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.08.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.08.3)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.08.4)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.09.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.09.3)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.11.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.11.2)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.1.4.3) → ocaml < 4.00.0 (ocaml.3.12.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.5.2) → ocaml < 4.04.0 (ocaml.4.03.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.5.3) → ocaml < 4.05.0 (ocaml.4.04.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.5.3) → ocaml < 4.05.0 (ocaml.4.04.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.5.3) → ocaml < 4.05.0 (ocaml.4.04.2)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.7.0) → ocaml < 4.06.0 (ocaml.4.05.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.9.0) → ocaml < 4.08.0 (ocaml.4.07.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.2.10.0) → ocaml < 4.10.0 (ocaml.4.08.1)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.3.0.0) → ocaml < 4.11.0 (ocaml.4.10.0)
  * No agreement on the version of ocaml:
    - (invariant) → ocaml >= 4.12.0 (ocaml.4.12.0)
    - batteries (batteries.3.0.0) → ocaml < 4.11.0 (ocaml.4.10.1)

Obviously in this case we should have been able to merge all the chains rather than just use one...

@kit-ty-kate
Copy link
Member Author

I have another really surprising and different one here:

$ opam switch show
4.12
$ opam install gen_js_api.1.0.6
[ERROR] Package conflict!
Sorry, no solution found: there seems to be a problem with your request.

No solution found, exiting

@kit-ty-kate
Copy link
Member Author

Could this be added to the next beta3 milestone btw? I really need it for my work on the upcoming OCaml 4.12.

@rjbou rjbou added this to the 2.1.0~beta4 milestone Nov 13, 2020
@dra27 dra27 modified the milestones: 2.1.0~beta4, 2.1.0~beta5 Jan 7, 2021
@kit-ty-kate
Copy link
Member Author

Here is another example of a package that fails without any messages like gen_js_api.1.0.6 above:

http://check.ocamllabs.io:8080/log/1610649046-de897adf36c4230dfea812f40c98223b31c4521a/4.12/not-available/pgocaml_ppx.4.2.2

@kit-ty-kate
Copy link
Member Author

Actually, the empty conflict message problem looks like the bug in dose 6.0 I fixed here: #4515 (comment)
A similar code path also exists in 5.0.1 so I believe this might be the problem.

@kit-ty-kate kit-ty-kate modified the milestones: 2.1.0~beta5, 2.1.1 Feb 19, 2021
@kit-ty-kate
Copy link
Member Author

More testing with dose 5.0.1:

opam@22cdd2d0a793:~$ opam-2.0 install pgocaml_ppx.4.2.2
The following dependencies couldn't be met:
  - pgocaml_ppx -> ocaml-migrate-parsetree < 2.0.0 -> ocaml < 4.13
      base of this switch (use `--unlock-base' to force)
  - pgocaml_ppx -> ocaml-migrate-parsetree < 2.0.0 -> dune < 2.0 -> ocaml < 4.12
      base of this switch (use `--unlock-base' to force)

No solution found, exiting
opam@22cdd2d0a793:~$ opam-2.1 install pgocaml_ppx.4.2.2
[ERROR] Package conflict!
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 -> ocaml-migrate-parsetree < 2.0.0 -> ocaml-variants = 4.08.0+beta2
    not available because the package is pinned to version 4.13.0+trunk
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 -> ocaml-migrate-parsetree < 2.0.0 -> ocaml-variants = 4.08.0+beta3
    not available because the package is pinned to version 4.13.0+trunk

No solution found, exiting

Switching to master with dose 7.0.0, there seems to be no differences with opam 2.1:

$ opam --version
2.2.0~alpha~dev
$ opam install pgocaml_ppx.4.2.2
[ERROR] Package conflict!
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 -> ocaml-migrate-parsetree < 2.0.0 -> ocaml-variants = 4.08.0+beta2
    not available because the package is pinned to version 4.13.0+trunk
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 -> ocaml-migrate-parsetree < 2.0.0 -> ocaml-variants = 4.08.0+beta3
    not available because the package is pinned to version 4.13.0+trunk

No solution found, exiting

I also tested on a macOS/arm64 with dose 7.0.0 and it seems that the constraint solver does not like having "available constraints" in the compiler packages:

$ opam install pgocaml_ppx.4.2.2
[ERROR] Package conflict!
  * No agreement on the version of ocaml:
    - (invariant) → ocaml-variants = 4.13.0+trunk → ocaml = 4.13.0
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.11
    You can temporarily relax the switch invariant with `--update-invariant'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler < 3.07+1 | ocaml-system
      < 3.07+1 | ocaml-variants < 3.8~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions: 'sys-ocaml-version = "3.07"'
    no matching version
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.07+1 | ocaml-system
      = 3.07+1 | ocaml-variants < 3.8~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions: 'sys-ocaml-version = "3.07+1"'
    no matching version
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.07+2 | ocaml-system
      = 3.07+2 | ocaml-variants < 3.8~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions: 'sys-ocaml-version = "3.07+2"'
    no matching version
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.08.0 | ocaml-system
      >= 3.08.0 | ocaml-variants < 3.08.1~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.08.0"'
    no matching version
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.08.1 | ocaml-system
      >= 3.08.1 | ocaml-variants < 3.08.2~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.08.1"'
    no matching version
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.08.2 | ocaml-system
      >= 3.08.2 | ocaml-variants < 3.08.3~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.08.2"'
    no matching version
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.08.3 | ocaml-system
      >= 3.08.3 | ocaml-variants < 3.08.4~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.08.3"'
    no matching version
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.08.4 | ocaml-system
      >= 3.08.4 | ocaml-variants < 3.08.5~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.08.4"'
    no matching version
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.09.0 | ocaml-system
      >= 3.09.0 | ocaml-variants < 3.09.1~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.09.0"'
    no matching version
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.09.1 | ocaml-system
      >= 3.09.1 | ocaml-variants < 3.09.2~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.09.1"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.09.2 | ocaml-system
      >= 3.09.2 | ocaml-variants < 3.09.3~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.09.2"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.09.3 | ocaml-system
      >= 3.09.3 | ocaml-variants < 3.09.4~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.09.3"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.10.0 | ocaml-system
      >= 3.10.0 | ocaml-variants < 3.10.1~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.10.0"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.10.1 | ocaml-system
      >= 3.10.1 | ocaml-variants < 3.10.2~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.10.1"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.10.2 | ocaml-system
      >= 3.10.2 | ocaml-variants < 3.10.3~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.10.2"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.11.0 | ocaml-system
      >= 3.11.0 | ocaml-variants < 3.11.1~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.11.0"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.11.1 | ocaml-system
      >= 3.11.1 | ocaml-variants < 3.11.2~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.11.1"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.11.2 | ocaml-system
      >= 3.11.2 | ocaml-variants < 3.11.3~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.11.2"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.12.0 | ocaml-system
      >= 3.12.0 | ocaml-variants < 3.12.1~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.12.0"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 3.12.1 | ocaml-system
      >= 3.12.1 | ocaml-variants < 3.12.2~
    unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "3.12.1"'
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 4.00.0 | ocaml-system
      >= 4.00.0 | ocaml-variants < 4.00.1~
    unmet availability conditions: 'arch != "arm64" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.00.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 4.00.1 | ocaml-system
      >= 4.00.1 | ocaml-variants < 4.00.2~
    unmet availability conditions: 'arch != "arm64" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.00.1"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 4.01.0 | ocaml-system
      >= 4.01.0 | ocaml-variants < 4.01.1~
    unmet availability conditions: 'arch != "arm64" & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.01.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml = 4.02.0 → ocaml-base-compiler = 4.02.0 | ocaml-system
      >= 4.02.0 | ocaml-variants < 4.02.1~
    unmet availability conditions: '!(os = "macos" & arch = "arm64") & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.02.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 4.02.1 | ocaml-system
      >= 4.02.1 | ocaml-variants < 4.02.2~
    unmet availability conditions: '!(os = "macos" & arch = "arm64") & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.02.1"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 4.02.2 | ocaml-system
      >= 4.02.2 | ocaml-variants < 4.02.3~
    unmet availability conditions: '!(os = "macos" & arch = "arm64") & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.02.2"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 4.02.3 | ocaml-system
      >= 4.02.3 | ocaml-variants < 4.02.4~
    unmet availability conditions: '!(os = "macos" & arch = "arm64") & arch != "ppc64"'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.02.3"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.03.0 → ocaml-base-compiler = 4.02.4 | ocaml-system
      >= 4.02.4 | ocaml-variants < 4.02.5~
    no matching version
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.12.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.04 → ocaml-base-compiler = 4.03.0 | ocaml-system
      >= 4.03.0 | ocaml-variants < 4.03.1~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.03.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.04 → ocaml-base-compiler = 4.03.1 | ocaml-system
      >= 4.03.1 | ocaml-variants < 4.03.2~
    no matching version
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.12.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.05 → ocaml-base-compiler = 4.04.0 | ocaml-system
      >= 4.04.0 | ocaml-variants < 4.04.1~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.04.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.05 → ocaml-base-compiler = 4.04.1 | ocaml-system
      >= 4.04.1 | ocaml-variants < 4.04.2~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.04.1"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.05 → ocaml-base-compiler = 4.04.2 | ocaml-system
      >= 4.04.2 | ocaml-variants < 4.04.3~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.04.2"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.05 → ocaml-base-compiler = 4.04.3 | ocaml-system
      >= 4.04.3 | ocaml-variants < 4.04.4~
    no matching version
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.12.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.06.0 → ocaml-base-compiler = 4.05.0 | ocaml-system
      >= 4.05.0 | ocaml-variants < 4.05.1~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.05.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.06.0 → ocaml-base-compiler = 4.05.1 | ocaml-system
      >= 4.05.1 | ocaml-variants < 4.05.2~
    no matching version
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.12.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.08 → ocaml-base-compiler = 4.06.0 | ocaml-system
      >= 4.06.0 | ocaml-variants < 4.06.1~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.06.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.08 → ocaml-base-compiler = 4.06.1 | ocaml-system
      >= 4.06.1 | ocaml-variants < 4.06.2~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.06.1"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.08 → ocaml-base-compiler = 4.06.2 | ocaml-system
      >= 4.06.2 | ocaml-variants < 4.06.3~
    no matching version
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.12.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.08 → ocaml-base-compiler = 4.07.0 | ocaml-system
      >= 4.07.0 | ocaml-variants < 4.07.1~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.07.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.08 → ocaml-base-compiler = 4.07.1 | ocaml-system
      >= 4.07.1 | ocaml-variants < 4.07.2~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.07.1"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.08 → ocaml-base-compiler = 4.07.2 | ocaml-system
      >= 4.07.2 | ocaml-variants < 4.07.3~
    no matching version
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.12.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.10 → ocaml-base-compiler = 4.08.0 | ocaml-system
      >= 4.08.0 | ocaml-variants < 4.08.1~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.08.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.10 → ocaml-base-compiler = 4.08.1 | ocaml-system
      >= 4.08.1 | ocaml-variants < 4.08.2~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.08.1"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.10 → ocaml-base-compiler = 4.08.2 | ocaml-system
      >= 4.08.2 | ocaml-variants < 4.08.3~
    no matching version
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.12.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.10 → ocaml-base-compiler = 4.09.0 | ocaml-system
      >= 4.09.0 | ocaml-variants < 4.09.1~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.09.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.10 → ocaml-base-compiler = 4.09.1 | ocaml-system
      >= 4.09.1 | ocaml-variants < 4.09.2~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.09.1"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.10 → ocaml-base-compiler = 4.09.2 | ocaml-system
      >= 4.09.2 | ocaml-variants < 4.09.3~
    no matching version
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.12.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.11 → ocaml-base-compiler = 4.10.0 | ocaml-system
      >= 4.10.0 | ocaml-variants < 4.10.1~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.10.0"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
  * Missing dependency:
    - pgocaml_ppx = 4.2.2 → ppx_tools → ocaml < 4.11 → ocaml-base-compiler = 4.10.1 | ocaml-system
      >= 4.10.1 | ocaml-variants < 4.10.2~
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions, e.g. 'sys-ocaml-version = "4.10.1"'
    unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'

No solution found, exiting

So overall the issue won't be resolved by upgrading dose. It is an endemic issue since opam 2.1 (as seen above by the clear difference between the conflict message in 2.0 and 2.1)

@dinosaure
Copy link

Hi, currently I try to use opam.2.1.0 with a certain version of unipi available here: robur-coop/unipi#4 without pin and opam shows this error:

$ git clone https://github.com/dinosaure/unipi
$ cd unipi
$ git checkout with-paf-opam
$ mirage configure
$ make depends
opam pin add -k path --no-action --yes mirage-unikernel-unipi-unix . && opam depext --yes --update mirage-unikernel-unipi-unix ; opam pin remove --no-action mirage-unikernel-unipi-unix
Package mirage-unikernel-unipi-unix does not exist, create as a NEW package? [Y/n] y
[mirage-unikernel-unipi-unix.~dev] synchronised (file:///home/dinosaure/dev/unipi)
mirage-unikernel-unipi-unix is now pinned to file:///home/dinosaure/dev/unipi (version ~dev)
opam: unknown command `depext'.
Usage: opam COMMAND ...
Try `opam --help' for more information.
Ok, mirage-unikernel-unipi-unix is no longer pinned to file:///home/dinosaure/dev/unipi (version ~dev)
opam install -y --deps-only .
[ERROR] Package conflict!
Sorry, no solution found: there seems to be a problem with your request.

No solution found, exiting
make: *** [Makefile:15 : depends] Erreur 20

So I believe that something is wrong about dependencies but I don't have any clues 😕 . Do you know an option to explain where is the error?

@dra27 dra27 modified the milestones: 2.1.1, 2.1.2 Sep 17, 2021
@dra27 dra27 modified the milestones: 2.1.2, 2.1.3 Nov 19, 2021
@kit-ty-kate
Copy link
Member Author

kit-ty-kate commented Dec 13, 2021

Same issue with opam-repository at a5d7cdc0c91452b0aef4fa71c331ee5237f6dddd and bikallem/resto@e725f56 only gets us:

[ERROR] Package conflict!
Sorry, no solution found: there seems to be a problem with your request.
FROM ocaml/opam:debian-11-ocaml-4.12@sha256:40813dc1391636b4a428afbf0e678d2c81b80d9eade8a5214d8ee271fae155f3
RUN sudo ln -f /usr/bin/opam-dev /usr/bin/opam
RUN opam init --reinit -ni
RUN opam remote set-url default git+https://github.com/ocaml/opam-repository.git#a5d7cdc0c91452b0aef4fa71c331ee5237f6dddd
RUN opam pin add --with-version 0.6.1 git+https://github.com/bikallem/resto.git#e725f56dd2d5ca0148272d754a0f29ffe76f94e8

@rjbou
Copy link
Collaborator

rjbou commented Aug 15, 2022

Please refer to discussion for examples of conflict message.

@leoheck
Copy link

leoheck commented Sep 6, 2022

I am seeing this message, it may be related here. But I am looking for a workaround.
Do you guys know anything that can help me fix this issue?

Switch invariant: ["ocaml-base-compiler" {= "4.09.1"} | "ocaml-system" {= "4.09.1"}]
[ERROR] Could not determine which packages to install for this switch:
  * Missing dependency:
    - ocaml-base-compiler = 4.09.1 | ocaml-system = 4.09.1
    unmet availability conditions: '!(os = "macos" & arch = "arm64")'
    unmet availability conditions: 'sys-ocaml-version = "4.09.1"'

@kit-ty-kate
Copy link
Member Author

In this case, the conflict message is rather explicit:

  • you are requesting a new switch with OCaml 4.09.1
  • but, you are on macOS/arm64
  • and OCaml 4.09.1 does not support macOS/arm64

Only OCaml 4.10.2 or >= 4.12.0 support the new architecture. This part could be explicited but I don't see an easy way to do that so I don't think it's doable.

@leoheck
Copy link

leoheck commented Sep 6, 2022

I agree. Thanks for the answer.

I am not an OCaml user/dev so I am not really into OCaml. But I do use a software that was written in OCaml. This one uses 4.09.1. I am not sure if I can upgrade to let's say 4.10.2. I thought I tried once to use a different version than what was specified but I think I ran into problems and something did not work.

Do you know if upgrading the version like this is something that should work?

@kit-ty-kate
Copy link
Member Author

It should, but the OCaml forum is the preferred place to ask this kind of question: https://discuss.ocaml.org/

@leoheck
Copy link

leoheck commented Sep 6, 2022

Ok, thanks anyway @kit-ty-kate

@RyanGibb
Copy link
Contributor

RyanGibb commented Feb 7, 2023

I came across a confusing message in https://github.com/RyanGibb/ocaml-dns-eio/

With:

depends: [
  "ocaml" {= "5.1.0"}
  "dune" {>= "3.4"}
  "eio_main"
  "dns"
  "dns-server" {>= "6.2.2"}
  "odoc" {with-doc}
]

I got:

[ERROR] No solution including optional dependencies for dns-server-eio.dev:   * No agreement on the version of ocaml:
             - dns-server-eio -> dns-server >= 6.2.2 -> tcpip >= 7.0.0 -> bisect_ppx >= 2.5.0 -> ocaml < 5.0
             - dns-server-eio -> ocaml >= 5.1.0

Changing "ocaml" {= "5.1.0"} to "ocaml" {>= "5.0.0"} fixed this. I would have expected the error message to say ocaml <= 5.0 instead of ocaml < 5.0.

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