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

Could we shorten the solver rejections message? #9559

Closed
philderbeast opened this issue Dec 24, 2023 · 5 comments · Fixed by #9560
Closed

Could we shorten the solver rejections message? #9559

philderbeast opened this issue Dec 24, 2023 · 5 comments · Fixed by #9560

Comments

@philderbeast
Copy link
Collaborator

The solver rejections message can be very long with a lot of repetition. Could we shorten it?

  • What we have now with cabal-install at 8070ab1
$ cabal build all --enable-tests --enable-benchmarks --dry-run
HEAD is now at 71c2494 Further improvements in parsing attachments.
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] next goal: pandoc (user goal)
[__0] rejecting: pandoc-3.1.11, pandoc-3.1.10 (constraint from user target
requires ==3.1.9)
[__0] rejecting: pandoc-3.1.9 (constraint from project config
https://stackage.org/lts-21.7/cabal.config requires ==3.0.1)
[__0] rejecting: pandoc-3.1.8, pandoc-3.1.7, pandoc-3.1.6.2, pandoc-3.1.6.1,
pandoc-3.1.6, pandoc-3.1.5, pandoc-3.1.4, pandoc-3.1.3, pandoc-3.1.2,
pandoc-3.1.1, pandoc-3.1, pandoc-3.0.1, pandoc-3.0, pandoc-2.19.2,
pandoc-2.19.1, pandoc-2.19, pandoc-2.18, pandoc-2.17.1.1, pandoc-2.17.1,
pandoc-2.17.0.1, pandoc-2.17, pandoc-2.16.2, pandoc-2.16.1, pandoc-2.16,
pandoc-2.15, pandoc-2.14.2, pandoc-2.14.1, pandoc-2.14.0.3, pandoc-2.14.0.2,
pandoc-2.14.0.1, pandoc-2.14, pandoc-2.13, pandoc-2.12, pandoc-2.11.4,
pandoc-2.11.3.2, pandoc-2.11.3.1, pandoc-2.11.3, pandoc-2.11.2, pandoc-2.11.1.1,
pandoc-2.11.1, pandoc-2.11.0.4, pandoc-2.11.0.2, pandoc-2.11.0.1, pandoc-2.11,
pandoc-2.10.1, pandoc-2.10, pandoc-2.9.2.1, pandoc-2.9.2, pandoc-2.9.1.1,
pandoc-2.9.1, pandoc-2.9, pandoc-2.8.1, pandoc-2.8.0.1, pandoc-2.8,
pandoc-2.7.3, pandoc-2.7.2, pandoc-2.7.1, pandoc-2.7, pandoc-2.6, pandoc-2.5,
pandoc-2.4, pandoc-2.3.1, pandoc-2.3, pandoc-2.2.3.2, pandoc-2.2.3.1,
pandoc-2.2.3, pandoc-2.2.2.1, pandoc-2.2.2, pandoc-2.2.1, pandoc-2.2,
pandoc-2.1.3, pandoc-2.1.2, pandoc-2.1.1, pandoc-2.1, pandoc-2.0.6,
pandoc-2.0.5, pandoc-2.0.4, pandoc-2.0.3, pandoc-2.0.2, pandoc-2.0.1.1,
pandoc-2.0.1, pandoc-2.0.0.1, pandoc-2.0, pandoc-1.19.2.4, pandoc-1.19.2.3,
pandoc-1.19.2.2, pandoc-1.19.2.1, pandoc-1.19.2, pandoc-1.19.1, pandoc-1.19,
pandoc-1.18, pandoc-1.17.2, pandoc-1.17.1, pandoc-1.17.0.3, pandoc-1.17.0.2,
pandoc-1.17.0.1, pandoc-1.17, pandoc-1.16.0.2, pandoc-1.16.0.1, pandoc-1.16,
pandoc-1.15.2.1, pandoc-1.15.2, pandoc-1.15.1.1, pandoc-1.15.1, pandoc-1.15.0.6,
pandoc-1.15.0.5, pandoc-1.15.0.4, pandoc-1.15.0.3, pandoc-1.15.0.2,
pandoc-1.14.1, pandoc-1.13.2.1, pandoc-1.13.2, pandoc-1.13.1, pandoc-1.13.0.1,
pandoc-1.13, pandoc-1.12.4.2, pandoc-1.12.4, pandoc-1.12.3.3, pandoc-1.12.3.2,
pandoc-1.12.3.1, pandoc-1.12.3, pandoc-1.12.2.1, pandoc-1.12.2, pandoc-1.12.1,
pandoc-1.12.0.2, pandoc-1.12.0.1, pandoc-1.12, pandoc-1.11.1, pandoc-1.11,
pandoc-1.10.1, pandoc-1.10.0.5, pandoc-1.10.0.4, pandoc-1.10.0.3,
pandoc-1.10.0.2, pandoc-1.10.0.1, pandoc-1.10, pandoc-1.9.4.5, pandoc-1.9.4.4,
pandoc-1.9.4.3, pandoc-1.9.4.2, pandoc-1.9.4.1, pandoc-1.9.4, pandoc-1.9.3,
pandoc-1.9.2, pandoc-1.9.1.2, pandoc-1.9.1.1, pandoc-1.9.1, pandoc-1.9.0.5,
pandoc-1.9.0.4, pandoc-1.9.0.3, pandoc-1.9.0.2, pandoc-1.9, pandoc-1.8.2.1,
pandoc-1.8.2, pandoc-1.8.1.2, pandoc-1.8.1.1, pandoc-1.8.1, pandoc-1.8.0.3,
pandoc-1.8.0.2, pandoc-1.8.0.1, pandoc-1.8, pandoc-1.6.0.1, pandoc-1.6,
pandoc-1.5.1.1, pandoc-1.5.1, pandoc-1.5.0.1, pandoc-1.5, pandoc-1.4,
pandoc-1.3, pandoc-1.2.1, pandoc-1.2, pandoc-1.1, pandoc-1.0.0.1, pandoc-1.0,
pandoc-0.46, pandoc-0.45, pandoc-0.44, pandoc-0.43, pandoc-0.42, pandoc-0.41,
pandoc-0.4, pandoc-2.11.0.3, pandoc-1.15.0.1, pandoc-1.15, pandoc-1.14.0.4,
pandoc-1.14.0.3, pandoc-1.14.0.2, pandoc-1.14.0.1, pandoc-1.14 (constraint from
user target requires ==3.1.9)
[__0] fail (backjumping, conflict set: pandoc)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: pandoc
  • The same rejections but shortened by dropping the common prefix
$ cabal build all --enable-tests --enable-benchmarks --dry-run
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] next goal: pandoc (user goal)
[__0] rejecting: pandoc; 3.1.11, 3.1.10 (constraint from user target requires
==3.1.9)
[__0] rejecting: pandoc; 3.1.9 (constraint from project config
https://stackage.org/lts-21.7/cabal.config requires ==3.0.1)
[__0] rejecting: pandoc; 3.1.8, 3.1.7, 3.1.6.2, 3.1.6.1, 3.1.6, 3.1.5, 3.1.4,
3.1.3, 3.1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9.0.5, 1.9.0.4, 1.9.0.3,
1.9.0.2, 1.9, 1.8.2.1, 1.8.2, 1.8.1.2, 1.8.1.1, 1.8.1, 1.8.0.3, 1.8.0.2,
1.8.0.1, 1.8, 1.6.0.1, 1.6, 1.5.1.1, 1.5.1, 1.5.0.1, 1.5, 1.4, 1.3, 1.2.1, 1.2,
1.1, 1.0.0.1, 1.0, 0.46, 0.45, 0.44, 0.43, 0.42, 0.41, 0.4, 2.11.0.3, 1.15.0.1,
1.15, 1.14.0.4, 1.14.0.3, 1.14.0.2, 1.14.0.1, 1.14 (constraint from user target
requires ==3.1.9)
[__0] fail (backjumping, conflict set: pandoc)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: pandoc
@ulysses4ever
Copy link
Collaborator

ulysses4ever commented Dec 24, 2023

Great idea! But as many great ideas, has been suggested before, I think: #8939

@philderbeast
Copy link
Collaborator Author

I checked out the branch for #9541 from @yvan-sraka. It does nearly the same thing but uses two colons instead of a colon and semi-colon and is a +348 -145 line change.

- [__0] rejecting: pandoc: 3.1.8, 3.1.7, 3.1.6.2, 3.1.6.1, 3.1.6, 3.1.5, 3.1.4
+ [__0] rejecting: pandoc; 3.1.8, 3.1.7, 3.1.6.2, 3.1.6.1, 3.1.6, 3.1.5, 3.1.4

@gbaz
Copy link
Collaborator

gbaz commented Dec 24, 2023

I would prefer going further and attempt to summarize contiguous version ranges, even though this would be more work.

[__0] rejecting: pandoc; 1.14 through 3.1.8

@philderbeast
Copy link
Collaborator Author

@gbaz I had thought of compressing ranges too but wanted to take a small step that in some cases would half the bulk of the output.

@grayjay
Copy link
Collaborator

grayjay commented Dec 24, 2023

I think that correctly displaying version ranges would be a much larger and more complex change, with more design considerations. I would be very happy to have the incremental change, especially since a similar issue has been open since 2017 without a fix (#4251).

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

Successfully merging a pull request may close this issue.

4 participants