-
Notifications
You must be signed in to change notification settings - Fork 710
cabal install
prints unhelpful error when .cabal filename does not match the package name
#7322
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
Comments
@falsifian thanks for reporting the error which i can reproduce with last cabal-3.4.0.0
So we could do:
Imo the build and install behaviour should be coherent and throw an error, but if it is already a warning is cause someone would be using .cabal names different from package names locally (???). |
cabal install
prints unhelpful error when .cabal filename does not match the package name
As a easier to do improvement, we could improve the actual error message, without touching actual semantics |
While my intention was primarily to improve the workflow with name-agnostic Cabal files (e.g. Would this be an acceptable solution at all? If so, then there a some open questions regarding the approach:
|
Describe the bug
In a project where the
.cabal
file has underscores in the name,cabal install
fails with an unhelpful error message:After much head-scratching, I realized the problem was I needed to rename
note_graph.cabal
tonote-graph.cabal
.To Reproduce
Steps to reproduce the behavior:
a_b.cabal
.Main.hs
.cabal v2-install .:x
Expected behavior
One of the following would be preferrable:
Your .cabal file should not have underscores in the name.
System information
OpenBSD current
I've got custom-built
ghc
andcabal-install
ports; let me know if you'd like me to retry with an unmodified install.The text was updated successfully, but these errors were encountered: