-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cabal file aaaaa.cabal has a mismatched package name: bbbbb #317
Comments
I'm not sure if you're asking for an improvement, but I think your error is arising because the name field in your Lambdu.cabal is |
I really think this is a bug in stack. |
Cabal is inconsistent in its handling here. If I'm not mistaken, trying to install an sdist with an incorrectly named .cabal file would fail. Is there a reason why we want to support this workflow? It seems pretty broken to me. |
I'm not really 100% sure to understand why the package-name must match the cabal file name. @snoyberg if you confirm stack is right, I can open issues on cabal and lamdu and link them here if you want. |
I think it's fair to call this a cabal bug, and opening an issue would be appreciated. To demonstrate, take a package (I used acme-missiles, as it's my go-to simple package example), rename the .cabal file, run
And then:
|
I'm also inclined to say they should match, and in this particular example there's no utility in them not matching. |
One other advantage of matching is that you can just look at the file system and know what the project name is instead of being surprised by something different inside the cabal file. |
Are there any known workarounds for projects that are hosted in source control systems that append branch names to the project name? For example, package.cabal might be located in the folder package-dev/ package-1.0/, package/tags/1.0 etc... |
There are no restrictions on the folder name. It is the name of the .cabal file that should match the package name field inside it. |
hplayground.cabal does not match the package name it defines. Please rename the file to: ghcjs-hplay.cabal For more information, see: commercialhaskell/stack#317
As azverkan points out, when referring to other modules, say in git repositories (e.g. https://github.com/apache/thrift/tree/e134cbc6ff797c061332ecfae697e807832e1682/lib/hs ), it is not always the case that the filename and module name match. It would be super helpful to have some way of getting around this. |
Yeah, I think wontfix is the wrong call here. Demanding that I follow best practices is one thing; demanding that all of my dependencies do is overkill. |
➜ lamdu git:(master) stack build
Checking against build plan lts-2.14
Checking against build plan lts-1.15
Checking against build plan nightly-2015-06-15
No matching snapshot was found for your package, falling back to: lts-2.14
This behavior will improve in the future, please see: #253
Writing default config file to: /home/rvion/dev/lamdu/stack.yaml
cabal file /home/rvion/dev/lamdu/Lamdu.cabal has a mismatched package name: lamdu-ide
The text was updated successfully, but these errors were encountered: