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

[2.1.0~alpha] Solver failures are too verbose #4171

Closed
kit-ty-kate opened this issue May 1, 2020 · 1 comment · Fixed by #4349
Closed

[2.1.0~alpha] Solver failures are too verbose #4171

kit-ty-kate opened this issue May 1, 2020 · 1 comment · Fixed by #4349
Assignees
Milestone

Comments

@kit-ty-kate
Copy link
Member

Using opam master (3def1a6), when opam cannot find a solution to install a package, the breakdown of why the package can't be installed became too verbose compared to previous opam versions.
For instance when trying to install pgocaml.4.2 on ocaml-variants.4.11.0+trunk, the error message used to be the following:

The following dependencies couldn't be met:
  - pgocaml -> ppx_deriving >= 4.0 -> ocaml < 4.11.0
      base of this switch (use `--unlock-base' to force)

No solution found, exiting

With opam 2.1.0~alpha, the error message became:

The following dependencies couldn't be met:
  - pgocaml -> ppx_deriving >= 4.0 -> ocaml < 4.11.0 -> ocaml-base-compiler (!= 3.07+1 & != 3.09.3 & != 3.11.0 & != 4.02.1 & != 4.07.1)
      conflict with the base packages of this switch
  - pgocaml -> ppx_deriving >= 4.0 -> ocaml < 4.11.0 -> ocaml-variants < 4.10.2~
      incompatible with the switch invariant ["ocaml-variants" {= "4.11.0+trunk"}] (use `--update-invariant' to force)
  - ocaml-variants -> ocaml = 4.11.0
Your request can't be satisfied:
  - No available version of ocaml satisfies the constraints
  - No available version of ocaml-variants satisfies the constraints
  - ocaml-variants (!= 4.00.0+debug-runtime & < 4.00.1+annot | >= 4.00.1+french & != 4.01.0+PIC & != 4.01.0+open-types & < 4.02.1+32bit | = 4.02.1+modular-implicits | >= 4.02.1+musl+static & != 4.02.3+buckle-1 & < 4.03.0+32bit |
>= 4.03.0+beta1+flambda & != 4.04.0+32bit & < 4.04.0+afl | = 4.04.0+beta1+flambda | >= 4.04.0+beta2+flambda & < 4.04.0+fPIC | >= 4.04.0+fp & < 4.04.0+spacetime | >= 4.04.1+32bit & != 4.04.1+fp & != 4.04.2+32bit & != 4.04.2+fp &
!= 4.04.2+safe-string & != 4.05.0+32bit & != 4.05.0+beta1+flambda & != 4.05.0+lto & != 4.05.0+musl+static+flambda & < 4.05.0+rc1+flambda | >= 4.05.0+spacetime & != 4.05.0+trunk+flambda & < 4.06.0+32bit | >= 4.06.0+beta1 & !=
4.06.0+beta2+default-unsafe-string & < 4.06.0+beta2+fp+flambda | = 4.06.0+force-safe-string | = 4.06.0+rc1+afl | >= 4.06.0+rc1+fp & < 4.06.1+bytecode-only | >= 4.06.1+flambda & != 4.06.1+fp+flambda & !=
4.06.1+musl+static+flambda & != 4.06.1+rc1+force-safe-string & != 4.06.1+rc1+fp+flambda & != 4.06.1+rc2+default-unsafe-string & != 4.06.1+rc2+fp & != 4.06.1+trunk+afl & != 4.06.1+trunk+force-safe-string & < 4.07.0+32bit | =
4.07.0+beta2 | >= 4.07.0+beta2+default-unsafe-string & != 4.07.0+bytecode-only & != 4.07.0+rc1 & != 4.07.0+rc1+fp+flambda & != 4.07.0+rc2+fp+flambda & != 4.07.0+trunk+afl & != 4.07.1+afl & != 4.07.1+default-unsafe-string & <
4.07.1+force-safe-string | >= 4.07.1+musl+flambda & < 4.07.1+rc1+32bit | >= 4.07.1+rc1+default-unsafe-string & != 4.07.1+spacetime & < 4.08.0+beta1 | >= 4.08.0+beta1+flambda & < 4.08.0+beta1+fp+flambda | >= 4.08.0+beta2+afl & !=
4.08.0+beta3+afl & < 4.08.0+beta3+fp | >= 4.08.0+bytecode-only & < 4.08.0+flambda+no-flat-float-array | >= 4.08.0+fp & != 4.08.0+rc1+fp+flambda & != 4.08.0+rc2+flambda & < 4.08.1+bytecode-only | = 4.08.1+flambda | >=
4.08.1+fp+flambda & != 4.08.1+rc1+afl & != 4.08.1+rc2+force-safe-string & < 4.08.1+rc3+flambda | = 4.08.1+rc3+fp | >= 4.08.1+spacetime & < 4.08.1+trunk+force-safe-string | >= 4.08.1+trunk+fp+flambda & != 4.09.0+beta1+default-
unsafe-string & != 4.09.0+beta1+fp & < 4.09.0+beta2 | >= 4.09.0+beta2+default-unsafe-string & != 4.09.0+beta2+fp & < 4.09.0+default-unsafe-string | = 4.09.0+fp | = 4.09.0+musl+flambda | >= 4.09.0+spacetime & < 4.09.1+afl+flambda | =
4.09.1+flambda+no-flat-float-array | >= 4.09.1+fp & != 4.09.1+spacetime & < 4.10.0+32bit | = 4.11.0+trunk) is in conflict with ocaml-base-compiler

No solution found, exiting

I rely on these messages a lot in my work with the OCaml Software Foundation on getting the OCaml ecosystem ready for the next OCaml release and I find the new message rather unpleasant to work with. Is there a way to get the old behaviour back?

@AltGr
Copy link
Member

AltGr commented May 4, 2020

Yup, sorry about this, we are aware of the regression (due to switch-invariants) and have already spent some time to improve them, but not completely there yet ; certainly expect them to be fixed before the release.

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

Successfully merging a pull request may close this issue.

3 participants