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

stack.yaml package field pointing to *.*.cabal not found #895

Closed
haroldcarr opened this Issue Sep 1, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@haroldcarr
Contributor

haroldcarr commented Sep 1, 2015

I added:

packages:
- '.'
- /Users/carr/openhc/test-hunit-util

but got:

> stack build
No .cabal file found in directory /Users/carr/openhc/test-hunit-util/

The cabal file in that location is named Test.HUnit.Util.cabal. If I rename the file to Test-HUnit-Util.cabal then it is found

(although, it then has other unrelated problems:

cabal file /Users/carr/openhc/test-hunit-util/Test-HUnit-Util.cabal has a mismatched package name: Test-HUnit-Util

)

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Sep 2, 2015

(although, it then has other unrelated problems:

This is intended behavior: Hackage and cabal have inconsistent behavior around mismatching package/file names, and in stack we've decided to be consistent and enforce matching names. For details, see: #317

We can improve the first part about finding .cabal files with periods in them.

snoyberg added a commit that referenced this issue Sep 2, 2015

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Sep 2, 2015

I've updated master with better code for displaying accurate error messages. Now, it says things like:

cabal file path /home/vagrant/Desktop/periods/foo.bar.cabal does not match the package name it defines.
Please rename the file to: periods.cabal
For more information, see: https://github.com/commercialhaskell/stack/issues/317

@snoyberg snoyberg closed this Sep 2, 2015

@haroldcarr

This comment has been minimized.

Contributor

haroldcarr commented Sep 2, 2015

thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment