Skip to content
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

Multiple .cabal files found in directory #2254

Closed
creichert opened this issue Jun 8, 2016 · 2 comments
Closed

Multiple .cabal files found in directory #2254

creichert opened this issue Jun 8, 2016 · 2 comments

Comments

@creichert
Copy link

creichert commented Jun 8, 2016

Multiple .cabal files found in directory /home/christopher/dev/rbros/assertible/.stack-work/downloaded/Po3M4t2NzhXM/: Po3M4t2NzhXM.cabal, reserve.cabal

I realize this issue has been opened before but I seem to experience it only on a specific package reserve. I think this might be due to the fact that there is a cabal file in addition to an hpack package.yaml file but I'm not certain as I don't use hpack.

I've tried to provide as much info below as possible.

Steps to reproduce:

  1. Create new project

    $ stack new test

  2. Update the stack.yaml

Use this content:

resolver: nightly-2016-06-02
flags: {}
extra-deps:
  - http-kit-0.5.1
  # https://github.com/snoyberg/http-client/issues/196
  - tls-1.3.7

packages:
  - '.'
  - location:
      git: https://github.com/sol/reserve.git
      commit: HEAD
    extra-dep: true
  1. Run stack test

You should see:

Multiple .cabal files found in directory /home/christopher/dev/rbros/assertible/.stack-work/downloaded/Po3M4t2NzhXM/: Po3M4t2NzhXM.cabal, reserve.cabal

If I don't use an explicit packages entry for reserve, it works.

Here is the stack --version output:

$ stack --version
Version 1.1.3, Git revision 7669717 x86_64 hpack-0.14.0

Here is the command I ran with --verbose:

stack test --verbose
Version 1.1.3, Git revision 7669717b38b6cb9d54bc839c5583819095de3cb8 x86_64 hpack-0.14.0
2016-06-07 19:56:02.237376: [debug] Checking for project config at: /home/christopher/dev/haskell/test/stack.yaml @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.Config src/Stack/Config.hs:823:9)
2016-06-07 19:56:02.237531: [debug] Loading project config file stack.yaml @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.Config src/Stack/Config.hs:841:13)
2016-06-07 19:56:02.238657: [debug] Checking whether stack was built with libgmp4 @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.Config src/Stack/Config.hs:327:5)
2016-06-07 19:56:02.238723: [debug] Run process: ldd /home/christopher/.cabal/bin/stack @(stack_0wyO5SXLQRo4g09I2zgdw7:System.Process.Read src/System/Process/Read.hs:291:3)
2016-06-07 19:56:02.245825: [debug] Stack was not built with libgmp4 @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.Config src/Stack/Config.hs:331:14)
2016-06-07 19:56:02.245913: [debug] Trying to decode /home/christopher/.stack/build-plan-cache/x86_64-linux/nightly-2016-06-02.cache @(stack_0wyO5SXLQRo4g09I2zgdw7:Data.Store.VersionTagged src/Data/Store/VersionTagged.hs:51:5)
2016-06-07 19:56:02.248138: [debug] Success decoding /home/christopher/.stack/build-plan-cache/x86_64-linux/nightly-2016-06-02.cache @(stack_0wyO5SXLQRo4g09I2zgdw7:Data.Store.VersionTagged src/Data/Store/VersionTagged.hs:60:13)
2016-06-07 19:56:02.249523: [debug] Getting system compiler version @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.Setup src/Stack/Setup.hs:341:17)
2016-06-07 19:56:02.250007: [debug] Asking GHC for its version @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.Setup.Installed src/Stack/Setup/Installed.hs:97:13)
2016-06-07 19:56:02.250045: [debug] Run process: ghc --numeric-version @(stack_0wyO5SXLQRo4g09I2zgdw7:System.Process.Read src/System/Process/Read.hs:291:3)
2016-06-07 19:56:02.271711: [debug] Getting Cabal package version @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.GhcPkg src/Stack/GhcPkg.hs:165:5)
2016-06-07 19:56:02.271809: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_0wyO5SXLQRo4g09I2zgdw7:System.Process.Read src/System/Process/Read.hs:291:3)
2016-06-07 19:56:02.286168: [debug] Resolving package entries @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.Setup src/Stack/Setup.hs:221:5)
2016-06-07 19:56:02.286681: [debug] Run process: git reset --hard 88b020e52b5d42c8c68740bd5f62614dd293e85b -- @(stack_0wyO5SXLQRo4g09I2zgdw7:System.Process.Read src/System/Process/Read.hs:291:3)
2016-06-07 19:56:02.288476: [debug] Getting global package database location @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-06-07 19:56:02.288531: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_0wyO5SXLQRo4g09I2zgdw7:System.Process.Read src/System/Process/Read.hs:291:3)
2016-06-07 19:56:02.301162: [debug] Running hpack on /home/christopher/dev/haskell/test/.stack-work/downloaded/z7D7RJbs2EVM/package.yaml @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.Package src/Stack/Package.hs:1147:9)
2016-06-07 19:56:02.302755: [debug] hpack output unchanged in /home/christopher/dev/haskell/test/.stack-work/downloaded/z7D7RJbs2EVM/z7D7RJbs2EVM.cabal @(stack_0wyO5SXLQRo4g09I2zgdw7:Stack.Package src/Stack/Package.hs:1154:38)
Multiple .cabal files found in directory /home/christopher/dev/haskell/test/.stack-work/downloaded/z7D7RJbs2EVM/: reserve.cabal, z7D7RJbs2EVM.cabal
@mgsloan
Copy link
Contributor

mgsloan commented Jun 8, 2016

Interesting! The issue is that if the package name is omitted, then hpack bases it on the directory name. I've opened sol/hpack#109 about this.

I've also opened #2255 discussing only running hpack on local packages.

@sol
Copy link
Contributor

sol commented Jun 8, 2016

@creichert this can easily be fixed in reserve by specifying the package name in package.yaml. PRs please.

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

No branches or pull requests

3 participants