-
Notifications
You must be signed in to change notification settings - Fork 701
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
cabal-install generates a confusing error message #9045
Comments
This message is from ghc, not cabal, despite its mentioning cabal. And it is probably hard to change. |
(wearing ghc hat, not cabal hat, since this is a more general problem) I'm going to assume that comment is because of ghc suggesting a cabal-specific alternative. It used to suggest Alternatives require either much tighter integration between stack/cabal and ghc, or that they do more work to hide alternative package versions (which would probably make the error message worse in other ways). And I'm not sure what else you can do to convey "if you want to use this module, you need to use this version of your dependency". |
The error message could be improved, still! Since GHC knows you depend on some other version of that exact dependency, it could present you with that information. In the error message, it looks like you are not depending on So, in addition to the seen message, I think it would make sense in GHC to at least mention "hey, you are actually depending on this already, maybe the module name has changed". Or it can at least mention, that this module is not exported from |
Doesn't reproduce for me. What I see is:
Which is a perfectly sensible error message imo. It seems that something funny is going on with your environment. Have you used
In that case, I think, it's a perfectly sensible error message: basically, you asked All in all, we're keep getting into trouble because
How would "it" (GHC, Cabal, whatever) know which package to blame? This module "is not exported" from thousand other packages that you can depend upon. Do you think "it" should be clever enough to match |
I can provide more information about the environment if that would help, but I have no idea what information would be useful. I don't remember whether I ran
I disagree. In particular, the conjunction of
looks like a contradiction to me, and was extremely confusing. I'd say a better error message would be something like
|
After doing |
Fixed in next release: #8903 |
Describe the bug
If a source tries to import modules that are available from another version of package the project already depends on the error message cabal-install generates is extremely confusing:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would prefer in this scenario to not have any package suggestions at all, but the other option would be to check during the error message generation to see whether the dependency is already there, and if it is, to display which version of the package it actually resolves to.
System information
The text was updated successfully, but these errors were encountered: