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

Make confict messages more precise #6110

Open
kit-ty-kate opened this issue Jul 22, 2024 · 0 comments
Open

Make confict messages more precise #6110

kit-ty-kate opened this issue Jul 22, 2024 · 0 comments

Comments

@kit-ty-kate
Copy link
Member

With #6106 fixing #4373, many conflict messages now appear as they should be. However some things can still be improved. For example:

# Using opam-repository at cc50463b37f3ef495531c6623ef84118b9b78963
$ opam install pyml
[ERROR] Package conflict!
  * No agreement on the version of ocaml:
    - (invariant) → ocaml-base-compiler >= 5.2.0 → ocaml = 5.2.0
    - pyml → ocaml < 5.0
    You can temporarily relax the switch invariant with `--update-invariant'
  * No agreement on the version of ocaml-base-compiler:
    - (invariant) → ocaml-base-compiler >= 5.2.0
    - pyml → ocaml < 5.0 → ocaml-base-compiler < 4.14.3~
  * No agreement on the version of ocaml-base-compiler:
    - (invariant) → ocaml-base-compiler >= 5.2.0
    - pyml → stdcompat >= 18 → ocaml < 5.2 → ocaml-base-compiler < 5.1.2~
  * Incompatible packages:
    - (invariant) → ocaml-base-compiler >= 5.2.0
    - pyml → ocaml < 5.0 → dkml-base-compiler
  * Incompatible packages:
    - (invariant) → ocaml-base-compiler >= 5.2.0
    - pyml → ocaml < 5.0 → ocaml-variants
  * Missing dependency:
    - pyml → ocaml < 5.0 → ocaml-variants → ocaml-beta
    unmet availability conditions: 'enable-ocaml-beta-repository'

The first, second and three last can be confusing to users. The reason the solver returns that is that pyml.20220615 and older have the ocaml < 5.0 constraint but not the newer versions. I think it would help to output something like:

[ERROR] Package conflict!
  * No agreement on the version of ocaml:
    - (invariant) → ocaml-base-compiler >= 5.2.0 → ocaml = 5.2.0
    - pyml <= 20220615 → ocaml < 5.0
    You can temporarily relax the switch invariant with `--update-invariant'
  * No agreement on the version of ocaml-base-compiler:
    - (invariant) → ocaml-base-compiler >= 5.2.0
    - pyml <= 20220615 → ocaml < 5.0 → ocaml-base-compiler < 4.14.3~
  * No agreement on the version of ocaml-base-compiler:
    - (invariant) → ocaml-base-compiler >= 5.2.0
    - pyml → stdcompat >= 18 → ocaml < 5.2 → ocaml-base-compiler < 5.1.2~
  * Incompatible packages:
    - (invariant) → ocaml-base-compiler >= 5.2.0
    - pyml <= 20220615 → ocaml < 5.0 → dkml-base-compiler
  * Incompatible packages:
    - (invariant) → ocaml-base-compiler >= 5.2.0
    - pyml <= 20220615 → ocaml < 5.0 → ocaml-variants
  * Missing dependency:
    - pyml <= 20220615 → ocaml < 5.0 → ocaml-variants → ocaml-beta
    unmet availability conditions: 'enable-ocaml-beta-repository'
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

1 participant