error-messages icon indicating copy to clipboard operation
error-messages copied to clipboard

Cabal and GHC environment file related errors

Open noughtmare opened this issue 2 years ago • 2 comments

Inspired by this stackoverflow question.

When running commands such as cabal install --lib bytestring the result may depend on what is already in the default environment file. However, cabal will not really tell you that. It only says things like:

bytestring-0.10.12.1 (constraint from user target requires ==0.10.12.0)

And

bytestring-0.10.12.0 (constraint from user target requires ==0.11.3.1)

I think it would be good to show exactly where these constraints come from, e.g. with file names and line numbers.

Also I think it would be useful to have a general warning/info message about which environment files are used.

noughtmare avatar Aug 12 '22 13:08 noughtmare

Would it make sense to post this suggestion to cabal directly? The word on the street is that the maintainers are eager for these kinds of suggestions. This repo here is good if there is some wiggle room on the best phrasing of the message, but that doesn't quite seem to be the case here.

goldfirere avatar Oct 20 '22 02:10 goldfirere

That makes sense, I've opened https://github.com/haskell/cabal/issues/8540.

noughtmare avatar Oct 20 '22 08:10 noughtmare