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

Temporarily building against a "shadowing" local package? #992

Closed
mitchellwrosen opened this issue Sep 15, 2015 · 11 comments
Closed

Temporarily building against a "shadowing" local package? #992

mitchellwrosen opened this issue Sep 15, 2015 · 11 comments
Assignees
Milestone

Comments

@mitchellwrosen
Copy link
Contributor

I found a way to confuse stack and require a manual removal of the local package database, or something to that effect. I haven't worked out all the details, but basically what I've done is this:

  • Initialize a new project and add persistent and persistent-template as dependencies (using lts-3.4, this brings in persistent-2.2 and persistent-template-2.1.3.4:
-- snapshot db
/Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb
   persistent-2.2 (persistent-2.2-7814fec4f4ee40ea6b1f627410f1c9eb)
   persistent-template-2.1.3.4 (persistent-template-2.1.3.4-4508b858709b85b5c0149527551ed9fc)
  • Decide that I want to modify persistent locally and build against it, so I git clone it and add /path/to/local/persistent to my stack.yaml's packages
  • Rebuild, which causes persistent-template to rebuild and depend on this local persistent.
-- local db
/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb
   persistent-2.2 (persistent-2.2-3dd9b8c4bcaf5265acba55fc4993f288)
   persistent-template-2.1.3.4 (persistent-template-2.1.3.4-4508b858709b85b5c0149527551ed9fc)
  • Decide that I want to go back to building against the snapshot's persistent, so I delete the line from stack.yaml
  • Get this error:
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
package persistent-template-2.1.3.4 requires persistent-2.2
package junk-0.1.0.0 requires persistent-2.2
junk-0.1.0.0: build
Preprocessing library junk-0.1.0.0...
<command line>: cannot satisfy -package-id persistent-template-2.1.3.4-4508b858709b85b5c0149527551ed9fc:
    persistent-template-2.1.3.4-4508b858709b85b5c0149527551ed9fc is unusable due to missing or recursive dependencies:
      persistent-2.2-3dd9b8c4bcaf5265acba55fc4993f288
    (use -v for more information)

I think I'm getting this error because junk is unregistered before rebuilding, but my local persistent-template and persistent are not. Thus, junk goes to depend on the snapshot persistent-2.2-7814fec4f4ee40ea6b1f627410f1c9eb, while my local persistent-template still depends on the local persistent-2.2-3dd9b8c4bcaf5265acba55fc4993f288.

I haven't figured out how to get out of this situation without rm -rfing the local package db and rebuilding.

Deleting local packages from stack.yaml and expecting stack to work 100% correctly might be asking too much. I know stack doesn't attempt to be any sort of package manager, nor support any cleaning up of build artifacts. Still, I don't feel I did anything too out the ordinary with temporarily shadowing a snapshot package with a local one. If anything, a stack clean && stack build should have "just worked", but stack clean doesn't appear to do anything :)

@rvion
Copy link
Contributor

rvion commented Sep 15, 2015

I confirm the bug
I had the same problem a few days ago.
I didn't find any other way but to rm -rf the local package db too

@snoyberg
Copy link
Contributor

I've been tracking down a number of bugs all around a similar concept here, but unfortunately haven't been able to reproduce any of them (this included). Can you provide the --verbose output, and confirm that this reproduces on the latest master?

@snoyberg snoyberg self-assigned this Sep 16, 2015
@mitchellwrosen
Copy link
Contributor Author

Sure. I can reproduce it with HEAD @ c0525a2.

.
├── LICENSE
├── Lib.hs
├── Setup.hs
├── junk.cabal
└── stack.yaml

junk.cabal

name:                junk
version:             0.1.0.0
synopsis:            Initial project template from stack
description:         Please see README.md
homepage:            http://github.com/githubuser/junk#readme
license:             BSD3
license-file:        LICENSE
author:              Author name here
maintainer:          example@example.com
copyright:           2010 Author Here
category:            Web
build-type:          Simple
cabal-version:       >=1.10

library
  exposed-modules:     Lib
  build-depends:       base >= 4.7 && < 5
                     , persistent
                     , persistent-template
  default-language:    Haskell2010

stack.yaml (1)

flags: {}
packages:
- '.'
extra-deps: []
resolver: lts-3.4

stack -v build (1)

Version 0.1.4.1, Git revision c0525a2431b7e383e06473efacee1e2084abf2d0 (1837 commits) X86_64
2015-09-16 03:55:37.235624: [debug] Checking for project config at: /Users/mrosen/junk/stack.yaml @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Config src/Stack/Config.hs:466:9)
2015-09-16 03:55:37.235828: [debug] Loading project config file stack.yaml @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Config src/Stack/Config.hs:489:13)
2015-09-16 03:55:37.236369: [debug] Trying to decode /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:37.240495: [debug] Success decoding /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:37.243241: [debug] Run process: ghc --info @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:37.294246: [debug] Run process: ghc --numeric-version @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:37.324307: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:37.346057: [debug] Run process: ghc-pkg init /Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:37.363046: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:37.38499: [debug] Checking resolver: lts-3.4 @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Source src/Stack/Build/Source.hs:162:17)
2015-09-16 03:55:37.385089: [debug] Trying to decode /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:37.388593: [debug] Success decoding /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:37.393395: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:37.590185: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:37.591708: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:37.626125: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:37.697823: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:37.720983: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:37.867223: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:37.86735: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:38.022664: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:38.076515: [debug] All installs are local; releasing snapshot lock early. @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build src/Stack/Build.hs:92:28)
2015-09-16 03:55:38.077093: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:38.103224: [info] junk-0.1.0.0: configure @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:55:38.103322: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ configure --user --package-db=clear --package-db=global --package-db=/Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --libdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/lib --bindir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/bin --datadir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/share --libexecdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/libexec --sysconfdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/etc --docdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/junk-0.1.0.0 --htmldir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/junk-0.1.0.0 --haddockdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/junk-0.1.0.0 --dependency=base=base-4.8.1.0-075aa0db10075facc5aaa59a7991ca2f --dependency=persistent=persistent-2.2-7814fec4f4ee40ea6b1f627410f1c9eb --dependency=persistent-template=persistent-template-2.1.3.4-4508b858709b85b5c0149527551ed9fc --enable-tests --enable-benchmarks @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:55:38.655978: [info] Configuring junk-0.1.0.0... @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:55:38.860842: [info] junk-0.1.0.0: build @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:55:38.860939: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build lib:junk --ghc-options "-hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file" @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:55:38.914502: [info] Preprocessing library junk-0.1.0.0... @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:55:38.98673: [info] [1 of 1] Compiling Lib              ( Lib.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Lib.o ) @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:55:39.312885: [info] In-place registering junk-0.1.0.0... @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:55:39.314274: [info] junk-0.1.0.0: install @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:55:39.314343: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ install @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:55:39.474606: [info] Installing library in @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:55:39.474719: [info] /Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/lib/x86_64-osx-ghc-7.10.2/junk-0.1.0.0-Ia8WHYSfT6B9GvOV4xAvY9 @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:55:39.474808: [info] Registering junk-0.1.0.0... @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:55:39.476481: [debug] Run process: ghc-pkg --no-user-package-db --package-db=/Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ field --simple-output junk id @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)

stack.yaml (2)

flags: {}
packages:
- '.'
- '/Users/mrosen/haskell/persistent/persistent'
extra-deps: []
resolver: lts-3.4

stack -v build (2)

Version 0.1.4.1, Git revision c0525a2431b7e383e06473efacee1e2084abf2d0 (1837 commits) X86_64
2015-09-16 03:55:46.762958: [debug] Checking for project config at: /Users/mrosen/junk/stack.yaml @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Config src/Stack/Config.hs:466:9)
2015-09-16 03:55:46.763166: [debug] Loading project config file stack.yaml @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Config src/Stack/Config.hs:489:13)
2015-09-16 03:55:46.763749: [debug] Trying to decode /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:46.768957: [debug] Success decoding /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:46.773612: [debug] Run process: ghc --info @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:46.822823: [debug] Run process: ghc --numeric-version @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:46.853565: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:46.874257: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:46.898488: [debug] Checking resolver: lts-3.4 @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Source src/Stack/Build/Source.hs:162:17)
2015-09-16 03:55:46.898587: [debug] Trying to decode /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:46.906642: [debug] Success decoding /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:46.909404: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:47.096267: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:47.113048: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:47.151434: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:47.223939: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:47.24551: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:47.408678: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:47.408802: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:47.586908: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:47.657997: [debug] All installs are local; releasing snapshot lock early. @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build src/Stack/Build.hs:92:28)
2015-09-16 03:55:47.658611: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:47.679681: [info] junk-0.1.0.0: unregistering @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:433:17)
2015-09-16 03:55:47.679783: [debug] Run process: ghc-pkg --no-user-package-db --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ unregister --user --force --ipid junk-0.1.0.0-fcebcc34c7fe7c2ef66de6c7399d5b6c @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:47.703567: [info] persistent-2.2: build @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:55:47.703687: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build lib:persistent --ghc-options "-hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file" @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:55:48.939636: [info] persistent-2.2: install @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:55:48.939743: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ install @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:55:49.15843: [debug] Run process: ghc-pkg --no-user-package-db --package-db=/Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ field --simple-output persistent id @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:49.202007: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:55:49.36195: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:55:49.380128: [info] persistent-template-2.1.3.4: configure @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:55:49.380218: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ configure --user --package-db=clear --package-db=global --package-db=/Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --libdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/lib --bindir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/bin --datadir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/share --libexecdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/libexec --sysconfdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/etc --docdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/persistent-template-2.1.3.4 --htmldir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/persistent-template-2.1.3.4 --haddockdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/persistent-template-2.1.3.4 --dependency=aeson=aeson-0.8.0.2-85507016086edfeeee941f8a8eed5cd2 --dependency=base=base-4.8.1.0-075aa0db10075facc5aaa59a7991ca2f --dependency=bytestring=bytestring-0.10.6.0-6e8453cb70b477776f26900f41a5e17a --dependency=containers=containers-0.5.6.2-2b49cce16f8a2908df8454387e550b93 --dependency=ghc-prim=ghc-prim-0.4.0.0-af16264bc80979d06e37ac63e3ba9a21 --dependency=monad-control=monad-control-1.0.0.4-9b806c409db033e571fac7650e2dbb97 --dependency=monad-logger=monad-logger-0.3.13.2-15d1996af63d4b1a2f9e4d414b3c04ca --dependency=path-pieces=path-pieces-0.2.0-9e97f8f87b45f7ebc6fbc52c9765d415 --dependency=persistent=persistent-2.2-3dd9b8c4bcaf5265acba55fc4993f288 --dependency=tagged=tagged-0.8.1-8fb7724b78ef88e44ca8950c77a173f6 --dependency=template-haskell=template-haskell-2.10.0.0-161ca39a5ae657ff216d049e722e60ea --dependency=text=text-1.2.1.3-2395ef415c1b20175aae83b50060e389 --dependency=transformers=transformers-0.4.2.0-21dcbf13c43f5d8cf6a1f54dee6c5bff --dependency=unordered-containers=unordered-containers-0.2.5.1-09ed02f61ed89449c8cd4b51d7f295c2 @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:55:50.141153: [info] persistent-template-2.1.3.4: build @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:55:50.141243: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build --ghc-options "-hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file" @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:55:59.237835: [info] persistent-template-2.1.3.4: install @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:55:59.237934: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ install @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:55:59.439445: [debug] Run process: ghc-pkg --no-user-package-db --package-db=/Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ field --simple-output persistent-template id @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:55:59.482128: [info] junk-0.1.0.0: configure @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:55:59.482215: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ configure --user --package-db=clear --package-db=global --package-db=/Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --libdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/lib --bindir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/bin --datadir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/share --libexecdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/libexec --sysconfdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/etc --docdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/junk-0.1.0.0 --htmldir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/junk-0.1.0.0 --haddockdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/junk-0.1.0.0 --dependency=base=base-4.8.1.0-075aa0db10075facc5aaa59a7991ca2f --dependency=persistent=persistent-2.2-3dd9b8c4bcaf5265acba55fc4993f288 --dependency=persistent-template=persistent-template-2.1.3.4-4508b858709b85b5c0149527551ed9fc @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:56:00.244302: [info] junk-0.1.0.0: build @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:56:00.244412: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build lib:junk --ghc-options "-hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file" @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:56:00.607238: [info] junk-0.1.0.0: install @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:56:00.607343: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ install @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:56:00.770807: [debug] Run process: ghc-pkg --no-user-package-db --package-db=/Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ field --simple-output junk id @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:00.813599: [info] Completed all 3 actions. @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:476:33)

stack.yaml (3) -- same as (1)

flags: {}
packages:
- '.'
extra-deps: []
resolver: lts-3.4

stack -v build (3)

Version 0.1.4.1, Git revision c0525a2431b7e383e06473efacee1e2084abf2d0 (1837 commits) X86_64
2015-09-16 03:56:09.177199: [debug] Checking for project config at: /Users/mrosen/junk/stack.yaml @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Config src/Stack/Config.hs:466:9)
2015-09-16 03:56:09.177408: [debug] Loading project config file stack.yaml @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Config src/Stack/Config.hs:489:13)
2015-09-16 03:56:09.178125: [debug] Trying to decode /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:56:09.18259: [debug] Success decoding /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:56:09.186585: [debug] Run process: ghc --info @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:09.235503: [debug] Run process: ghc --numeric-version @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:09.265886: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:09.287637: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:09.30987: [debug] Checking resolver: lts-3.4 @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Source src/Stack/Build/Source.hs:162:17)
2015-09-16 03:56:09.31005: [debug] Trying to decode /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:56:09.313796: [debug] Success decoding /Users/mrosen/.stack/build-plan-cache/x86_64-osx/lts-3.4.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:56:09.318746: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:56:09.512227: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:56:09.513671: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:09.548525: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:09.616102: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:09.638198: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:56:09.789482: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:56:09.78961: [debug] Trying to decode /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-09-16 03:56:09.941009: [debug] Success decoding /Users/mrosen/.stack/indices/Hackage/00-index.cache @(stack_I00QuB43wuxLd2PtvyCwTY:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-09-16 03:56:10.001389: [debug] All installs are local; releasing snapshot lock early. @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build src/Stack/Build.hs:92:28)
2015-09-16 03:56:10.001968: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:10.024894: [info] junk-0.1.0.0: unregistering @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:433:17)
2015-09-16 03:56:10.024995: [debug] Run process: ghc-pkg --no-user-package-db --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ unregister --user --force --ipid junk-0.1.0.0-fcebcc34c7fe7c2ef66de6c7399d5b6c @(stack_I00QuB43wuxLd2PtvyCwTY:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-16 03:56:10.048681: [info] junk-0.1.0.0: configure @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:56:10.048775: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ configure --user --package-db=clear --package-db=global --package-db=/Users/mrosen/.stack/snapshots/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --package-db=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/pkgdb/ --libdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/lib --bindir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/bin --datadir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/share --libexecdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/libexec --sysconfdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/etc --docdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/junk-0.1.0.0 --htmldir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/junk-0.1.0.0 --haddockdir=/Users/mrosen/junk/.stack-work/install/x86_64-osx/lts-3.4/7.10.2/doc/junk-0.1.0.0 --dependency=base=base-4.8.1.0-075aa0db10075facc5aaa59a7991ca2f --dependency=persistent=persistent-2.2-7814fec4f4ee40ea6b1f627410f1c9eb --dependency=persistent-template=persistent-template-2.1.3.4-4508b858709b85b5c0149527551ed9fc --enable-tests --enable-benchmarks @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:56:10.523534: [info] Configuring junk-0.1.0.0... @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:56:10.523653: [warn] Warning: This package indirectly depends on multiple versions of the same @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:56:10.523761: [warn] package. This is highly likely to cause a compile failure. @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:56:10.52387: [warn] package persistent-template-2.1.3.4 requires persistent-2.2 @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:56:10.523976: [warn] package junk-0.1.0.0 requires persistent-2.2 @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:56:10.813878: [info] junk-0.1.0.0: build @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:610:23)
2015-09-16 03:56:10.813975: [debug] Run process: /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build lib:junk --ghc-options "-hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file" @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:739:21)
2015-09-16 03:56:10.865967: [info] Preprocessing library junk-0.1.0.0... @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:56:10.93407: [warn] <command line>: cannot satisfy -package-id persistent-template-2.1.3.4-4508b858709b85b5c0149527551ed9fc:  @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:56:10.934254: [warn]     persistent-template-2.1.3.4-4508b858709b85b5c0149527551ed9fc is unusable due to missing or recursive dependencies: @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:56:10.934311: [warn]       persistent-2.2-3dd9b8c4bcaf5265acba55fc4993f288 @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)
2015-09-16 03:56:10.934355: [warn]     (use -v for more information) @(stack_I00QuB43wuxLd2PtvyCwTY:Stack.Build.Execute src/Stack/Build/Execute.hs:1222:35)

--  While building package junk-0.1.0.0 using:
      /Users/mrosen/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build lib:junk --ghc-options -hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file
    Process exited with code: ExitFailure 1

@snoyberg
Copy link
Contributor

@rvion What OS are you using?

@snoyberg
Copy link
Contributor

I was able to reproduce this finally with some help. Here's the problem: the installed package ID is not unique, and the exact same one is being used in both the snapshot and local databases. This means that when we say "I want persistent-template-deadbeef", it's completely ambiguous whether we mean the one in the snapshot or local database. GHC will choose the one in the later package database (which is the local one), which depends on the local copy of persistent, which we're no longer building against.

@mitchellwrosen your comment about unregistering seems like the right resolution here, though I'd prefer if there was a way to tell GHC much more directly which installed package we want. The problem here is that GHC can distinguish between two installed copies, but there's seemingly nothing we can say on the command line to make that distinction.

@snoyberg
Copy link
Contributor

I think this is now resolved, can you give it a shot on master?

@snoyberg snoyberg added this to the P1: Must milestone Sep 16, 2015
@mitchellwrosen
Copy link
Contributor Author

Yes, sorry I didn't make myself clear in the original post. I meant to point out that it's curious persistent-template had the same hash in both cases. Shouldn't a package's hash depend on its contents, dependencies, and its dependencies' hashes (not just their versions)?

Anyways, that was fast! I'll try a bit later today.

@rvion
Copy link
Contributor

rvion commented Sep 16, 2015

@snoyberg on OSX (10.11)

@mitchellwrosen
Copy link
Contributor Author

@snoyberg Fixed for me. Thank you sir!

@snoyberg
Copy link
Contributor

Pleasure, glad it's working! Now just debating whether I should open up a Cabal bug report about the matching installed package ID issue.

@snoyberg
Copy link
Contributor

Upstream issue reported: haskell/cabal#2830

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