/cc @kosmikus
(Would be useful to know in this ticket exactly _how_ the error messages are unfriendly, and what you'd like to see. I definitely agree that they're unfriendly, but how?)
We briefly discussed this in the last Hackathon with @kosmikus. It was clear that this was something that needed improvement, but it wasn't clearcut how to go about it, so further discussion was necessary.
The first step would be to classify the different kind of solver errors and try to come up with improved message proposals. For example, a frequent solver failure scenario is usually due to a single dependency having the wrong version bounds which for the untrained eye is somehow difficult to identify in the backtrack output. With #2860, it should be possible to pin the most likely candidate for these cases.
I could start writing a test suite representing different solver failure scenarios showing the current messages and how they could be improved.
BTW, do you have any external solver in mind from which we could get inspired? I personally like aptitude errors; after a failure it suggests alternative version solutions which would succeed.
#941 is related.
I proposed my idea of better error messages for cases when no valid build plans were found under different issue:
Duplicating it here.
I often see that this solver error confuses beginners. Maybe we can use some fancy ascii symbols. Something like this:
โโโ โ lens-4.17
ย ย โโโ โ
transformers-0.5.5.0
ย ย โโโ โ hashable
โโโ โ hashable-1.2.7.0
โ โโโ transformers-0.5.5.0 => base==4.12.0.0
โ โโโ hashable-1.2.7.0 => base>=4.4 && <4.12
โโโ โ hashable-1.2.6.1
โ โโโ transformers-0.5.5.0 => base==4.12.0.0
โ โโโ hashable-1.2.6.1 => base>=4.4 && <4.11
...
Probably, this format should be discussed more. It's just an idea.
Iโm an experienced Haskell/Cabal user, and I still had to make an educated guess at what you example meant.
Ultimately, I think more verbose error messages are going to be most informative. While the exact text of some error messages can still be a little confusing, I think GHC does a good job in this area with its error messages.
Closing, since there have been several improvements to solver error messages since this issue was opened (e.g., #3960, #5012, #5680), and there hasn't been any discussion for a while. Feel free to reopen to continue discussing the ideas mentioned in this issue.
Most helpful comment
I proposed my idea of better error messages for cases when no valid build plans were found under different issue:
Duplicating it here.
I often see that this solver error confuses beginners. Maybe we can use some fancy ascii symbols. Something like this:
Probably, this format should be discussed more. It's just an idea.