Haskell Summer of Code is currently soliciting ideas. One change that I’d like to see to cabal is a clearer formatting of resolver errors, to make it easier to understand what the fix should be. I’ve pasted a sample resolver error below. One, possibly naive, suggestion is that instead of giving 20 lines of exact versions, summarize them, e.g. rather than
rejecting: pretty-simple:setup.base-4.17.2.1,
pretty-simple:setup.base-4.17.2.0, pretty-simple:setup.base-4.17.1.0,
pretty-simple:setup.base-4.17.0.0, pretty-simple:setup.base-4.16.4.0,
...
instead say
rejecting: all pretty-simple:setup-base in the range 3.0.3.1-4.17.2.1
Unfortunately, I don’t currently know enough about cabal to say whether this and similar improvements are a Hard Problem^{TM} which can’t be reasonably resolved from the standpoint of constraint solver theory, or whether they’re hard to implement for some reason, or whether they’re simply not feasible for some other reason. Nor would I be able to supervise such a project without doing a lot of reading up on the current implementation.
I’d like to check whether other people would consider this a worthwhile improvement, and whether anyone knows if there’s any existing work in that area, and/or how it would be implemented in practice. If there’s someone who feels confident and excited about supervising such a project then great, please propose it! I will be in support. On the other hand if there is enough enthusiasm about the project but no one able to superivise it then maybe I can learn enough about cabal myself to supervise it.
cabal: Could not resolve dependencies:
[__0] trying: stan-0.1.2.0 (user goal)
[__1] trying: pretty-simple-4.1.2.0 (dependency of stan)
[__2] next goal: pretty-simple:setup.Cabal (dependency of pretty-simple)
[__2] rejecting: pretty-simple:setup.Cabal-3.10.2.0/installed-544a,
pretty-simple:setup.Cabal-3.10.2.1, pretty-simple:setup.Cabal-3.10.2.0,
pretty-simple:setup.Cabal-3.10.1.0, pretty-simple:setup.Cabal-3.8.1.0
(constraint from maximum version of Cabal used by Setup.hs requires <3.8)
[__2] trying: pretty-simple:setup.Cabal-3.6.3.0
[__3] next goal: pretty-simple:setup.unix (dependency of
pretty-simple:setup.Cabal)
[__3] rejecting: pretty-simple:setup.unix-2.8.3.0/installed-596c (conflict:
pretty-simple:setup.Cabal => pretty-simple:setup.unix>=2.6.0.0 && <2.8)
[__3] skipping: pretty-simple:setup.unix-2.8.5.0,
pretty-simple:setup.unix-2.8.4.0, pretty-simple:setup.unix-2.8.3.0,
pretty-simple:setup.unix-2.8.2.1, pretty-simple:setup.unix-2.8.2.0,
pretty-simple:setup.unix-2.8.1.1, pretty-simple:setup.unix-2.8.1.0,
pretty-simple:setup.unix-2.8.0.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '>=2.6.0.0 && <2.8' from
'pretty-simple:setup.Cabal')
[__3] trying: pretty-simple:setup.unix-2.7.3
[__4] next goal: pretty-simple:setup.base (dependency of pretty-simple)
[__4] rejecting: pretty-simple:setup.base-4.19.0.0/installed-e327 (conflict:
pretty-simple:setup.unix => pretty-simple:setup.base>=4.10 && <4.18)
[__4] skipping: pretty-simple:setup.base-4.19.0.0,
pretty-simple:setup.base-4.18.2.0, pretty-simple:setup.base-4.18.1.0,
pretty-simple:setup.base-4.18.0.0 (has the same characteristics that caused
the previous version to fail: excluded by constraint '>=4.10 && <4.18' from
'pretty-simple:setup.unix')
[__4] rejecting: pretty-simple:setup.base-4.17.2.1,
pretty-simple:setup.base-4.17.2.0, pretty-simple:setup.base-4.17.1.0,
pretty-simple:setup.base-4.17.0.0, pretty-simple:setup.base-4.16.4.0,
pretty-simple:setup.base-4.16.3.0, pretty-simple:setup.base-4.16.2.0,
pretty-simple:setup.base-4.16.1.0, pretty-simple:setup.base-4.16.0.0,
pretty-simple:setup.base-4.15.1.0, pretty-simple:setup.base-4.15.0.0,
pretty-simple:setup.base-4.14.3.0, pretty-simple:setup.base-4.14.2.0,
pretty-simple:setup.base-4.14.1.0, pretty-simple:setup.base-4.14.0.0,
pretty-simple:setup.base-4.13.0.0, pretty-simple:setup.base-4.12.0.0,
pretty-simple:setup.base-4.11.1.0, pretty-simple:setup.base-4.11.0.0,
pretty-simple:setup.base-4.10.1.0, pretty-simple:setup.base-4.10.0.0,
pretty-simple:setup.base-4.9.1.0, pretty-simple:setup.base-4.9.0.0,
pretty-simple:setup.base-4.8.2.0, pretty-simple:setup.base-4.8.1.0,
pretty-simple:setup.base-4.8.0.0, pretty-simple:setup.base-4.7.0.2,
pretty-simple:setup.base-4.7.0.1, pretty-simple:setup.base-4.7.0.0,
pretty-simple:setup.base-4.6.0.1, pretty-simple:setup.base-4.6.0.0,
pretty-simple:setup.base-4.5.1.0, pretty-simple:setup.base-4.5.0.0,
pretty-simple:setup.base-4.4.1.0, pretty-simple:setup.base-4.4.0.0,
pretty-simple:setup.base-4.3.1.0, pretty-simple:setup.base-4.3.0.0,
pretty-simple:setup.base-4.2.0.2, pretty-simple:setup.base-4.2.0.1,
pretty-simple:setup.base-4.2.0.0, pretty-simple:setup.base-4.1.0.0,
pretty-simple:setup.base-4.0.0.0, pretty-simple:setup.base-3.0.3.2,
pretty-simple:setup.base-3.0.3.1 (constraint from non-upgradeable package
requires installed instance)
[__4] fail (backjumping, conflict set: pretty-simple,
pretty-simple:setup.base, pretty-simple:setup.unix)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: pretty-simple:setup.Cabal,
pretty-simple:setup.unix, pretty-simple:setup.base, pretty-simple, stan
Try running with --minimize-conflict-set to improve the error message.