Description
Hello everyone,
At IOG, we have repeatedly faced issues with the Cabal solver output, as recently mentioned by @angerman. We lose valuable time trying to locate crucial information that should be more prominently displayed.
Problem
Consider the following trace:
ouroboros-network> [__0] trying: ouroboros-network-0.6.0.0 (user goal)
ouroboros-network> [__1] trying: ouroboros-network-framework-0.5.0.0 (dependency of
ouroboros-network> ouroboros-network)
ouroboros-network> [__2] trying: ouroboros-network-testing-0.2.0.1 (dependency of
ouroboros-network> ouroboros-network-framework)
ouroboros-network> [__3] next goal: io-classes (dependency of ouroboros-network)
ouroboros-network> [__3] rejecting: io-classes-1.1.0.0 (conflict: ouroboros-network-testing =>
ouroboros-network> io-classes^>=0.3)
ouroboros-network> [__3] skipping: io-classes-1.0.0.1, io-classes-1.0.0.0, io-classes-0.6.0.0,
ouroboros-network> io-classes-0.5.0.0, io-classes-0.4.0.0 (has the same characteristics that
ouroboros-network> caused the previous version to fail: excluded by constraint '^>=0.3' from
ouroboros-network> 'ouroboros-network-testing')
ouroboros-network> [__3] rejecting: io-classes-0.3.0.0 (conflict: ouroboros-network =>
ouroboros-network> io-classes^>=1.1)
ouroboros-network> [__3] skipping: io-classes-0.2.0.0 (has the same characteristics that caused
ouroboros-network> the previous version to fail: excluded by constraint '^>=1.1' from
ouroboros-network> 'ouroboros-network')
ouroboros-network> [__3] fail (backjumping, conflict set: io-classes, ouroboros-network,
ouroboros-network> ouroboros-network-testing)
ouroboros-network> After searching the rest of the dependency tree exhaustively, these were the
ouroboros-network> goals I've had most trouble fulfilling: base, ouroboros-network, io-classes,
ouroboros-network> ouroboros-network-testing, ouroboros-network-framework
ouroboros-network> Try running with --minimize-conflict-set to improve the error message.
ouroboros-network> )
We need to look closely to identify the real issue:
ouroboros-network-0.6.0.0
+-> ouroboros-network-framework
| +-> ouroboros-network-framework-0.5.0.0 [selected]
| +-> ouroboros-network-testing-0.2.0.1 [selected]
+-> io-classes
+-> io-classes-1.1.0.0 [fail; ouroboros-network-testing => io-classes^>=0.3]
+-> io-classes-0.3.0.0 [fail; ouroboros-network => io-classes^>=1.1]
N.B.:
ouroboros-network-testing-0.3.0.0
has not been released withouroboros-network-0.6.0.0
, causing the resolution to fail. The issue was addressed in this commit oncoot/ouroboros-network-0.6.0.0
.
Proposed Solution
I suggest enhancing the solver output to be more readable and easier to parse, this has been already proposed:
One improvement to this proposal would be to mark the latest known version of a package to the solver, as described here:
This would overall contribute to a better user experience. WDYT?
Related Issues
Implementing this proposal would also be an opportunity to address:
- RFC: change default for logging to
+nowrap
#5488 - Should solver log be written already on -v2 or even -v? #7597
- Dependency resolution errors due to non-upgradeable packages should refer to compiler version #7993
- Colorize terminal messages #8525
Further enhancements could be made by addressing:
- Support for
--dump-dot-install-plan <outfile>
incabal install
#2728 - Improve the error message when integer-gmp is not installed #4285
- Deterministic solver output #4332
- Improve solver error message by finding a minimal conflict set #5647
- A mechanical way to report build progress #6886
In summary, we believe that enhancing the Cabal solver output will significantly improve the user experience and save developers time. I plan to implement most of these features in a fork next weeks and hope to got inputs from the community 🙂
Activity