commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
4k stars 844 forks source link

Failed to solve type class instances for complicated package dependencies #4335

Closed Atry closed 5 years ago

Atry commented 6 years ago

General summary/comments

I have a project of two packages, say, lib1 and lib2. The tests of lib1 depends on lib2. The library of lib2 depends on lib1.

Tests of lib1 fails if it requires type class instances defined in lib2. However, other types and functions defined of lib2 are available in tests of lib1.

I created a minimal reproduction at https://github.com/Atry/stack-issue-4335

Steps to reproduce

git clone git@github.com:Atry/stack-issue-4335.git && cd stack-issue-4335 && stack test lib1 --verbose

Expected

The tests should pass

Actual

Cloning into 'stack-issue-4335'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 16 (delta 1), reused 16 (delta 1), pack-reused 0
Receiving objects: 100% (16/16), done.
Resolving deltas: 100% (1/1), done.
Version 1.7.1 x86_64
Compiled with:
- Cabal-2.2.0.1
- Glob-0.9.2
- HUnit-1.6.0.0
- QuickCheck-2.11.3
- StateVar-1.1.1.0
- aeson-1.2.4.0
- aeson-compat-0.3.7.1
- annotated-wl-pprint-0.7.0
- ansi-terminal-0.8.0.2
- ansi-wl-pprint-0.6.8.2
- array-0.5.2.0
- asn1-encoding-0.9.5
- asn1-parse-0.9.4
- asn1-types-0.3.2
- async-2.2.1
- attoparsec-0.13.2.2
- attoparsec-iso8601-1.0.0.0
- auto-update-0.1.4
- base-4.11.1.0
- base-compat-0.9.3
- base-orphans-0.7
- base-prelude-1.2.0.1
- base16-bytestring-0.1.1.6
- base64-bytestring-1.0.0.1
- basement-0.0.7
- bifunctors-5.5.2
- binary-0.8.5.1
- bindings-uname-0.1
- bitarray-0.0.1.1
- blaze-builder-0.4.1.0
- blaze-html-0.9.0.1
- blaze-markup-0.8.2.1
- byteable-0.1.1
- bytestring-0.10.8.2
- call-stack-0.1.0
- case-insensitive-1.2.0.11
- cereal-0.5.5.0
- clock-0.7.2
- colour-2.3.4
- comonad-5.0.3
- conduit-1.3.0.2
- conduit-extra-1.3.0
- connection-0.2.8
- containers-0.5.11.0
- contravariant-1.4.1
- cookie-0.4.4
- cpphs-1.20.8
- cryptohash-0.11.9
- cryptohash-sha256-0.11.101.0
- cryptonite-0.25
- cryptonite-conduit-0.2.2
- data-default-class-0.1.2.0
- deepseq-1.4.3.0
- digest-0.0.1.2
- directory-1.3.1.5
- distributive-0.5.3
- dlist-0.8.0.4
- easy-file-0.2.1
- echo-0.1.3
- ed25519-0.0.5.0
- either-5
- exceptions-0.8.3
- extra-1.6.6
- fail-4.9.0.0
- fast-logger-2.4.11
- file-embed-0.0.10.1
- filelock-0.1.1.2
- filepath-1.4.2
- foundation-0.0.20
- free-5.0.1
- fsnotify-0.2.1.2
- generic-deriving-1.12.1
- ghc-boot-th-8.4.2
- ghc-prim-0.5.2.0
- gitrev-1.3.1
- hackage-security-0.5.3.0
- hashable-1.2.7.0
- haskell-src-exts-1.20.2
- haskell-src-meta-0.8.0.2
- hfsevents-0.1.6
- hourglass-0.2.11
- hpack-0.28.2
- hpc-0.6.0.3
- hspec-2.5.0
- hspec-core-2.5.0
- hspec-discover-2.5.0
- hspec-expectations-0.8.2
- hspec-smallcheck-0.5.2
- http-api-data-0.3.8.1
- http-client-0.5.12.1
- http-client-tls-0.3.5.3
- http-conduit-2.3.1
- http-types-0.12.1
- integer-gmp-1.0.2.0
- integer-logarithms-1.0.2.1
- lifted-base-0.2.3.12
- logict-0.6.0.2
- memory-0.14.16
- microlens-0.4.9.1
- microlens-th-0.4.2.1
- mime-types-0.1.0.7
- mintty-0.1.1
- monad-control-1.0.2.3
- monad-logger-0.3.28.5
- monad-loops-0.4.3
- mono-traversable-1.0.8.1
- mtl-2.2.2
- mustache-2.3.0
- neat-interpolation-0.3.2.1
- network-2.6.3.5
- network-uri-2.6.1.0
- old-locale-1.0.0.7
- old-time-1.1.0.3
- open-browser-0.2.1.0
- optparse-applicative-0.14.2.0
- optparse-simple-0.1.0
- parsec-3.1.13.0
- path-0.6.1
- path-io-1.3.3
- path-pieces-0.2.1
- pem-0.2.4
- persistent-2.8.2
- persistent-sqlite-2.8.1.2
- persistent-template-2.5.4
- polyparse-1.12
- pretty-1.1.3.6
- primitive-0.6.3.0
- process-1.6.3.0
- profunctors-5.2.2
- project-template-0.2.0.1
- quickcheck-io-0.2.0
- random-1.1
- regex-applicative-0.3.3
- regex-applicative-text-0.1.0.1
- resource-pool-0.2.3.2
- resourcet-1.2.1
- retry-0.7.6.2
- rio-0.1.1.0
- rts-1.0
- safe-0.3.17
- scientific-0.3.5.3
- semigroupoids-5.2.2
- semigroups-0.18.4
- setenv-0.1.1.3
- silently-1.2.5
- smallcheck-1.1.3.1
- socks-0.5.6
- split-0.2.3.3
- stm-2.4.5.0
- stm-chans-3.0.0.4
- store-0.4.3.2
- store-core-0.4.1
- streaming-commons-0.2.0.0
- syb-0.7
- tagged-0.8.5
- tar-0.5.1.0
- template-haskell-2.13.0.0
- temporary-1.2.1.1
- text-1.2.3.0
- text-metrics-0.3.0
- tf-random-0.5
- th-abstraction-0.2.6.0
- th-expand-syns-0.4.4.0
- th-lift-0.7.8
- th-lift-instances-0.1.11
- th-orphans-0.13.5
- th-reify-many-0.1.8
- th-utilities-0.2.0.1
- time-1.8.0.2
- time-locale-compat-0.1.1.4
- tls-1.4.1
- transformers-0.5.5.0
- transformers-base-0.4.5.2
- transformers-compat-0.6.1.6
- typed-process-0.2.2.0
- unicode-transforms-0.3.4
- unix-2.7.2.2
- unix-compat-0.5.0.1
- unix-time-0.3.8
- unliftio-0.2.7.0
- unliftio-core-0.1.1.0
- unordered-containers-0.2.9.0
- uri-bytestring-0.3.1.1
- uuid-types-1.0.3
- vector-0.12.0.1
- vector-algorithms-0.7.0.1
- void-0.7.2
- x509-1.7.3
- x509-store-1.6.6
- x509-system-1.6.6
- x509-validation-1.6.10
- yaml-0.8.29
- zip-archive-0.3.2.4
- zlib-0.6.2

Warning: this is an unsupported build that may use different versions of
dependencies and GHC than the officially released binaries, and therefore may
not behave identically.  If you encounter problems, please try the latest
official build by running 'stack upgrade --force-download'.

2018-10-03 23:07:50.558595: [debug] Checking for project config at: /private/tmp/stack-issue-4335/stack.yaml
@(src/Stack/Config.hs:850:9)
2018-10-03 23:07:50.559633: [debug] Loading project config file stack.yaml
@(src/Stack/Config.hs:876:13)
2018-10-03 23:07:50.562944: [debug] Decoding build plan from: /Users/twer/.stack/build-plan/lts-12.11.yaml
@(src/Stack/Snapshot.hs:164:5)
2018-10-03 23:07:50.563050: [debug] Trying to decode /Users/twer/.stack/build-plan-cache/lts-12.11.cache
@(src/Stack/Snapshot.hs:156:32)
2018-10-03 23:07:50.570039: [debug] Success decoding /Users/twer/.stack/build-plan-cache/lts-12.11.cache
@(src/Stack/Snapshot.hs:156:32)
2018-10-03 23:07:50.570143: [debug] Getting system compiler version
@(src/Stack/Setup.hs:393:17)
2018-10-03 23:07:50.570414: [debug] Run process: /usr/local/bin/ghc --info
@(src/Stack/Setup.hs:768:21)
2018-10-03 23:07:50.714422: [debug] Process finished in 144ms: /usr/local/bin/ghc --info
@(src/Stack/Setup.hs:768:21)
2018-10-03 23:07:50.716008: [debug] Getting global package database location
@(src/Stack/GhcPkg.hs:47:5)
2018-10-03 23:07:50.716271: [debug] Run process: /usr/local/bin/ghc-pkg --no-user-package-db list --global
@(src/Stack/GhcPkg.hs:76:10)
2018-10-03 23:07:50.716935: [debug] Getting Cabal package version
@(src/Stack/GhcPkg.hs:180:5)
2018-10-03 23:07:50.717042: [debug] Asking GHC for its version
@(src/Stack/Setup/Installed.hs:98:13)
2018-10-03 23:07:50.717233: [debug] Run process: /usr/local/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(src/Stack/GhcPkg.hs:76:10)
2018-10-03 23:07:50.717711: [debug] Run process: /usr/local/bin/ghc --numeric-version
@(src/Stack/Setup/Installed.hs:99:19)
2018-10-03 23:07:50.805608: [debug] Process finished in 88ms: /usr/local/bin/ghc --numeric-version
@(src/Stack/Setup/Installed.hs:99:19)
2018-10-03 23:07:50.805733: [debug] GHC version is: ghc-8.4.3
@(src/Stack/Setup/Installed.hs:102:13)
2018-10-03 23:07:50.844461: [debug] Process finished in 127ms: /usr/local/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(src/Stack/GhcPkg.hs:76:10)
2018-10-03 23:07:50.845769: [debug] Process finished in 129ms: /usr/local/bin/ghc-pkg --no-user-package-db list --global
@(src/Stack/GhcPkg.hs:76:10)
2018-10-03 23:07:50.845990: [debug] Resolving package entries
@(src/Stack/Setup.hs:256:5)
2018-10-03 23:07:50.846077: [debug] Trying to decode /Users/twer/.stack/loaded-snapshot-cache/x86_64-osx/ghc-8.4.3/lts-12.11.cache
@(src/Stack/Snapshot.hs:384:9)
2018-10-03 23:07:50.884955: [debug] Success decoding /Users/twer/.stack/loaded-snapshot-cache/x86_64-osx/ghc-8.4.3/lts-12.11.cache
@(src/Stack/Snapshot.hs:384:9)
2018-10-03 23:07:50.885550: [debug] Run process: /usr/local/bin/ghc-pkg init /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb/
@(src/Stack/GhcPkg.hs:104:16)
2018-10-03 23:07:50.947716: [debug] Process finished in 62ms: /usr/local/bin/ghc-pkg init /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb/
@(src/Stack/GhcPkg.hs:104:16)
2018-10-03 23:07:50.948837: [debug] Starting to execute command inside EnvConfig
@(src/Stack/Runners.hs:171:18)
2018-10-03 23:07:50.948907: [debug] Parsing the targets
@(src/Stack/Build/Target.hs:460:3)
2018-10-03 23:07:50.949076: [debug] Running hpack on /private/tmp/stack-issue-4335/lib1/package.yaml
@(src/Stack/Package.hs:1390:9)
2018-10-03 23:07:50.951668: [debug] hpack generated a modified version of /private/tmp/stack-issue-4335/lib1/lib1.cabal
@(src/Stack/Package.hs:1405:40)
2018-10-03 23:07:50.955044: [debug] Running hpack on /private/tmp/stack-issue-4335/lib2/package.yaml
@(src/Stack/Package.hs:1390:9)
2018-10-03 23:07:50.956978: [debug] hpack generated a modified version of /private/tmp/stack-issue-4335/lib2/lib2.cabal
@(src/Stack/Package.hs:1405:40)
2018-10-03 23:07:50.972192: [debug] Start: getPackageFiles /private/tmp/stack-issue-4335/lib1/lib1.cabal
@(src/Stack/Package.hs:332:21)
2018-10-03 23:07:50.975077: [debug] Finished in 3ms: getPackageFiles /private/tmp/stack-issue-4335/lib1/lib1.cabal
@(src/Stack/Package.hs:332:21)
2018-10-03 23:07:50.975311: [debug] Exception ignored when attempting to load /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib: /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib: openBinaryFile: does not exist (No such file or directory)
@(src/Stack/Build/Cache.hs:134:67)
2018-10-03 23:07:50.975623: [debug] Exception ignored when attempting to load /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib1-doctests: /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib1-doctests: openBinaryFile: does not exist (No such file or directory)
@(src/Stack/Build/Cache.hs:134:67)
2018-10-03 23:07:50.975928: [debug] Start: getPackageFiles /private/tmp/stack-issue-4335/lib2/lib2.cabal
@(src/Stack/Package.hs:332:21)
2018-10-03 23:07:50.977669: [debug] Finished in 2ms: getPackageFiles /private/tmp/stack-issue-4335/lib2/lib2.cabal
@(src/Stack/Package.hs:332:21)
2018-10-03 23:07:50.977802: [debug] Exception ignored when attempting to load /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib: /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib: openBinaryFile: does not exist (No such file or directory)
@(src/Stack/Build/Cache.hs:134:67)
2018-10-03 23:07:50.978056: [debug] Exception ignored when attempting to load /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib2-doctests: /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib2-doctests: openBinaryFile: does not exist (No such file or directory)
@(src/Stack/Build/Cache.hs:134:67)
2018-10-03 23:07:50.978543: [debug] Finding out which packages are already installed
@(src/Stack/Build/Installed.hs:57:5)
2018-10-03 23:07:50.979425: [debug] Run process: /usr/local/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:51.054724: [debug] Process finished in 75ms: /usr/local/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:51.054984: [debug] Ignoring package text due to wanting version 1.2.3.1 instead of 1.2.3.0
@(src/Stack/Build/Installed.hs:185:5)
2018-10-03 23:07:51.055481: [debug] Ignoring package haskeline due to wanting version 0.7.4.3 instead of 0.7.4.2
@(src/Stack/Build/Installed.hs:185:5)
2018-10-03 23:07:51.055609: [debug] Ignoring package stm due to wanting version 2.4.5.1 instead of 2.4.5.0
@(src/Stack/Build/Installed.hs:185:5)
2018-10-03 23:07:51.055717: [debug] Run process: /usr/local/bin/ghc-pkg --user --no-user-package-db --package-db /Users/twer/.stack/snapshots/x86_64-osx/lts-12.11/8.4.3/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:51.117108: [debug] Process finished in 61ms: /usr/local/bin/ghc-pkg --user --no-user-package-db --package-db /Users/twer/.stack/snapshots/x86_64-osx/lts-12.11/8.4.3/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:51.117271: [debug] Run process: /usr/local/bin/ghc-pkg --user --no-user-package-db --package-db /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:51.178706: [debug] Process finished in 61ms: /usr/local/bin/ghc-pkg --user --no-user-package-db --package-db /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:51.179327: [debug] Constructing the build plan
@(src/Stack/Build/ConstructPlan.hs:186:5)
2018-10-03 23:07:51.179875: [debug] Trying to decode /Users/twer/.stack/indices/Hackage/01-index.cache
@(src/Stack/PackageIndex.hs:405:23)
2018-10-03 23:07:51.417008: [debug] Success decoding /Users/twer/.stack/indices/Hackage/01-index.cache
@(src/Stack/PackageIndex.hs:405:23)
2018-10-03 23:07:51.417160: [debug] Checking if we are going to build multiple executables with the same name
@(src/Stack/Build.hs:177:5)
2018-10-03 23:07:51.417216: [debug] Executing the build plan
@(src/Stack/Build/Execute.hs:491:5)
2018-10-03 23:07:51.418445: [debug] Getting global package database location
@(src/Stack/GhcPkg.hs:47:5)
2018-10-03 23:07:51.418513: [debug] Run process: /usr/local/bin/ghc-pkg --no-user-package-db list --global
@(src/Stack/GhcPkg.hs:76:10)
2018-10-03 23:07:51.484027: [debug] Process finished in 65ms: /usr/local/bin/ghc-pkg --no-user-package-db list --global
@(src/Stack/GhcPkg.hs:76:10)
2018-10-03 23:07:51.485698: [debug] Exception ignored when attempting to load /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache: /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache: openBinaryFile: does not exist (No such file or directory)
@(src/Stack/Build/Cache.hs:139:27)
2018-10-03 23:07:51.485856: [debug] Exception ignored when attempting to load /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod: /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod: openBinaryFile: does not exist (No such file or directory)
@(src/Stack/Build/Cache.hs:144:24)
2018-10-03 23:07:51.485974: [info] lib1-0.2.0.0: configure
@(src/Stack/Build/Execute.hs:873:23)
2018-10-03 23:07:51.486785: [debug] Run process within /private/tmp/stack-issue-4335/lib1/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/usr/local/bin/ghc --with-ghc-pkg=/usr/local/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/twer/.stack/snapshots/x86_64-osx/lts-12.11/8.4.3/pkgdb --package-db=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb --libdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/lib --bindir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/bin --datadir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/share --libexecdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/libexec --sysconfdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/etc --docdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --htmldir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --haddockdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --dependency=base=base-4.11.1.0 --enable-benchmarks
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:53.191064: [debug] Process finished in 1704ms: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/usr/local/bin/ghc --with-ghc-pkg=/usr/local/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/twer/.stack/snapshots/x86_64-osx/lts-12.11/8.4.3/pkgdb --package-db=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb --libdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/lib --bindir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/bin --datadir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/share --libexecdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/libexec --sysconfdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/etc --docdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --htmldir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --haddockdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --dependency=base=base-4.11.1.0 --enable-benchmarks
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:53.191464: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache
@(src/Stack/Build/Cache.hs:164:7)
2018-10-03 23:07:53.192012: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache
@(src/Stack/Build/Cache.hs:164:7)
2018-10-03 23:07:53.192112: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod
@(src/Stack/Build/Cache.hs:173:7)
2018-10-03 23:07:53.192465: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod
@(src/Stack/Build/Cache.hs:173:7)
2018-10-03 23:07:53.192629: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:53.193118: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:53.193192: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib1-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:53.193533: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib1-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:53.193593: [info] lib1-0.2.0.0: build
@(src/Stack/Build/Execute.hs:873:23)
2018-10-03 23:07:53.193904: [debug] Run process within /private/tmp/stack-issue-4335/lib1/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build lib:lib1 --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:53.856099: [debug] Process finished in 662ms: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build lib:lib1 --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:53.856262: [debug] Start: getPackageFiles /private/tmp/stack-issue-4335/lib1/lib1.cabal
@(src/Stack/Package.hs:332:21)
2018-10-03 23:07:53.858417: [debug] Finished in 2ms: getPackageFiles /private/tmp/stack-issue-4335/lib1/lib1.cabal
@(src/Stack/Package.hs:332:21)
2018-10-03 23:07:53.858575: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:53.859012: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:53.859087: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib1-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:53.859651: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib1-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:53.859777: [info] lib1-0.2.0.0: copy/register
@(src/Stack/Build/Execute.hs:873:23)
2018-10-03 23:07:53.860033: [debug] Run process within /private/tmp/stack-issue-4335/lib1/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 copy
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:53.893634: [debug] Process finished in 33ms: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 copy
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:53.893934: [debug] Run process within /private/tmp/stack-issue-4335/lib1/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 register
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:54.161458: [debug] Process finished in 267ms: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 register
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:54.161744: [debug] Run process: /usr/local/bin/ghc-pkg --user --no-user-package-db --package-db /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb describe --simple-output lib1 --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:54.226582: [debug] Process finished in 65ms: /usr/local/bin/ghc-pkg --user --no-user-package-db --package-db /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb describe --simple-output lib1 --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:54.227076: [debug] Encoding /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/flag-cache/lib1-0.2.0.0-CuqIPzYUyYw8ddVMTcJt8X
@(src/Stack/Build/Cache.hs:212:7)
2018-10-03 23:07:54.227529: [debug] Finished writing /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/flag-cache/lib1-0.2.0.0-CuqIPzYUyYw8ddVMTcJt8X
@(src/Stack/Build/Cache.hs:212:7)
2018-10-03 23:07:54.227877: [info] lib2-0.2.0.0: configure (lib)
@(src/Stack/Build/Execute.hs:873:23)
2018-10-03 23:07:54.228101: [debug] Run process within /private/tmp/stack-issue-4335/lib2/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/usr/local/bin/ghc --with-ghc-pkg=/usr/local/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/twer/.stack/snapshots/x86_64-osx/lts-12.11/8.4.3/pkgdb --package-db=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb --libdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/lib --bindir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/bin --datadir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/share --libexecdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/libexec --sysconfdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/etc --docdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib2-0.2.0.0 --htmldir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib2-0.2.0.0 --haddockdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib2-0.2.0.0 --dependency=base=base-4.11.1.0 --dependency=lib1=lib1-0.2.0.0-CuqIPzYUyYw8ddVMTcJt8X
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:55.455182: [debug] Process finished in 1227ms: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/usr/local/bin/ghc --with-ghc-pkg=/usr/local/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/twer/.stack/snapshots/x86_64-osx/lts-12.11/8.4.3/pkgdb --package-db=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb --libdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/lib --bindir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/bin --datadir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/share --libexecdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/libexec --sysconfdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/etc --docdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib2-0.2.0.0 --htmldir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib2-0.2.0.0 --haddockdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib2-0.2.0.0 --dependency=base=base-4.11.1.0 --dependency=lib1=lib1-0.2.0.0-CuqIPzYUyYw8ddVMTcJt8X
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:55.455548: [debug] Encoding /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache
@(src/Stack/Build/Cache.hs:164:7)
2018-10-03 23:07:55.456198: [debug] Finished writing /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache
@(src/Stack/Build/Cache.hs:164:7)
2018-10-03 23:07:55.456341: [debug] Encoding /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod
@(src/Stack/Build/Cache.hs:173:7)
2018-10-03 23:07:55.456879: [debug] Finished writing /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod
@(src/Stack/Build/Cache.hs:173:7)
2018-10-03 23:07:55.457094: [debug] Encoding /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:55.457762: [debug] Finished writing /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:55.457919: [debug] Encoding /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib2-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:55.458475: [debug] Finished writing /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib2-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:55.458559: [info] lib2-0.2.0.0: build (lib)
@(src/Stack/Build/Execute.hs:873:23)
2018-10-03 23:07:55.459447: [debug] Run process within /private/tmp/stack-issue-4335/lib2/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build lib:lib2 --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:56.119131: [debug] Process finished in 659ms: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build lib:lib2 --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:56.119293: [debug] Start: getPackageFiles /private/tmp/stack-issue-4335/lib2/lib2.cabal
@(src/Stack/Package.hs:332:21)
2018-10-03 23:07:56.121158: [debug] Finished in 2ms: getPackageFiles /private/tmp/stack-issue-4335/lib2/lib2.cabal
@(src/Stack/Package.hs:332:21)
2018-10-03 23:07:56.121369: [debug] Encoding /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:56.121882: [debug] Finished writing /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:56.121957: [debug] Encoding /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib2-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:56.122360: [debug] Finished writing /private/tmp/stack-issue-4335/lib2/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib2-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:56.122418: [info] lib2-0.2.0.0: copy/register
@(src/Stack/Build/Execute.hs:873:23)
2018-10-03 23:07:56.122588: [debug] Run process within /private/tmp/stack-issue-4335/lib2/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 copy
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:56.157298: [debug] Process finished in 35ms: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 copy
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:56.157719: [debug] Run process within /private/tmp/stack-issue-4335/lib2/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 register
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:56.418661: [debug] Process finished in 261ms: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 register
@(src/Stack/Build/Execute.hs:1133:29)
2018-10-03 23:07:56.418959: [debug] Run process: /usr/local/bin/ghc-pkg --user --no-user-package-db --package-db /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb describe --simple-output lib2 --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:56.495071: [debug] Process finished in 76ms: /usr/local/bin/ghc-pkg --user --no-user-package-db --package-db /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb describe --simple-output lib2 --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-10-03 23:07:56.495465: [debug] Encoding /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/flag-cache/lib2-0.2.0.0-7kklPl6X3Ts6ujLTrKV7Qm
@(src/Stack/Build/Cache.hs:212:7)
2018-10-03 23:07:56.495896: [debug] Finished writing /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/flag-cache/lib2-0.2.0.0-7kklPl6X3Ts6ujLTrKV7Qm
@(src/Stack/Build/Cache.hs:212:7)
2018-10-03 23:07:56.496198: [info] lib1-0.2.0.0: configure (test)
@(src/Stack/Build/Execute.hs:873:23)
2018-10-03 23:07:56.496524: [debug] Run process within /private/tmp/stack-issue-4335/lib1/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/usr/local/bin/ghc --with-ghc-pkg=/usr/local/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/twer/.stack/snapshots/x86_64-osx/lts-12.11/8.4.3/pkgdb --package-db=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb --libdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/lib --bindir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/bin --datadir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/share --libexecdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/libexec --sysconfdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/etc --docdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --htmldir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --haddockdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --dependency=base=base-4.11.1.0 --dependency=lib2=lib2-0.2.0.0-7kklPl6X3Ts6ujLTrKV7Qm --enable-tests --enable-benchmarks
@(src/Stack/Prelude.hs:96:3)
2018-10-03 23:07:57.413826: [info] Configuring lib1-0.2.0.0...
@(src/Stack/Build/Execute.hs:1141:34)
2018-10-03 23:07:57.549856: [warn] clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:57.725878: [debug] Process finished in 1229ms: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/usr/local/bin/ghc --with-ghc-pkg=/usr/local/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/twer/.stack/snapshots/x86_64-osx/lts-12.11/8.4.3/pkgdb --package-db=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/pkgdb --libdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/lib --bindir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/bin --datadir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/share --libexecdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/libexec --sysconfdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/etc --docdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --htmldir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --haddockdir=/private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/doc/lib1-0.2.0.0 --dependency=base=base-4.11.1.0 --dependency=lib2=lib2-0.2.0.0-7kklPl6X3Ts6ujLTrKV7Qm --enable-tests --enable-benchmarks
@(src/Stack/Prelude.hs:96:3)
2018-10-03 23:07:57.726214: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache
@(src/Stack/Build/Cache.hs:164:7)
2018-10-03 23:07:57.726833: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache
@(src/Stack/Build/Cache.hs:164:7)
2018-10-03 23:07:57.726908: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod
@(src/Stack/Build/Cache.hs:173:7)
2018-10-03 23:07:57.727239: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod
@(src/Stack/Build/Cache.hs:173:7)
2018-10-03 23:07:57.727361: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-test-success
@(src/Stack/Build/Cache.hs:228:7)
2018-10-03 23:07:57.727662: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-test-success
@(src/Stack/Build/Cache.hs:228:7)
2018-10-03 23:07:57.727747: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:57.728048: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:57.728222: [debug] Encoding /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib1-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:57.728571: [debug] Finished writing /private/tmp/stack-issue-4335/lib1/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-lib1-doctests
@(src/Stack/Build/Cache.hs:153:7)
2018-10-03 23:07:57.728640: [info] lib1-0.2.0.0: build (test)
@(src/Stack/Build/Execute.hs:873:23)
2018-10-03 23:07:57.728830: [debug] Run process within /private/tmp/stack-issue-4335/lib1/: /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build test:lib1-doctests --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
@(src/Stack/Prelude.hs:96:3)
2018-10-03 23:07:57.817122: [info] Preprocessing library for lib1-0.2.0.0..
@(src/Stack/Build/Execute.hs:1141:34)
2018-10-03 23:07:57.817231: [info] Building library for lib1-0.2.0.0..
@(src/Stack/Build/Execute.hs:1141:34)
2018-10-03 23:07:57.946455: [info] [1 of 1] Compiling Lib1             ( src/Lib1.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib1.o )
@(src/Stack/Build/Execute.hs:1141:34)
2018-10-03 23:07:58.360217: [info] ignoring (possibly broken) abi-depends field for packages
@(src/Stack/Build/Execute.hs:1141:34)
2018-10-03 23:07:58.372039: [info] Preprocessing test suite 'lib1-doctests' for lib1-0.2.0.0..
@(src/Stack/Build/Execute.hs:1141:34)
2018-10-03 23:07:58.372183: [info] Building test suite 'lib1-doctests' for lib1-0.2.0.0..
@(src/Stack/Build/Execute.hs:1141:34)
2018-10-03 23:07:58.516508: [info] [1 of 2] Compiling Main             ( test/Main.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/lib1-doctests/lib1-doctests-tmp/Main.o )
@(src/Stack/Build/Execute.hs:1141:34)
2018-10-03 23:07:58.556089: [warn] 
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.556579: [warn] /private/tmp/stack-issue-4335/lib1/test/Main.hs:4:19: error:
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.556708: [warn]     • No instance for (MyClass MyNewType)
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.556779: [warn]         arising from a use of ‘myFunction’
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.556843: [warn]     • In the second argument of ‘($)’, namely
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.556906: [warn]         ‘myFunction $ MyNewType "x"’
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.556976: [warn]       In the expression: putStrLn $ myFunction $ MyNewType "x"
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.557039: [warn]       In an equation for ‘main’:
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.557100: [warn]           main = putStrLn $ myFunction $ MyNewType "x"
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.557162: [warn]   |
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.557232: [warn] 4 | main = putStrLn $ myFunction $ MyNewType "x"
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.557293: [warn]   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.580463: [warn] 
@(src/Stack/Build/Execute.hs:1140:34)
2018-10-03 23:07:58.580831: [info] 
--  Dumping log file due to warnings: /private/tmp/stack-issue-4335/.stack-work/logs/lib1-0.2.0.0.log

@(src/Stack/Build/Execute.hs:441:9)
2018-10-03 23:07:58.580943: [info] Configuring lib1-0.2.0.0...
@(src/Stack/Build/Execute.hs:453:25)
2018-10-03 23:07:58.580994: [info] clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
@(src/Stack/Build/Execute.hs:453:25)
2018-10-03 23:07:58.581039: [info] Preprocessing library for lib1-0.2.0.0..
@(src/Stack/Build/Execute.hs:453:25)
2018-10-03 23:07:58.581080: [info] Building library for lib1-0.2.0.0..
@(src/Stack/Build/Execute.hs:453:25)
2018-10-03 23:07:58.581224: [info] [1 of 1] Compiling Lib1             ( src/Lib1.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib1.o )
@(src/Stack/Build/Execute.hs:453:25)
2018-10-03 23:07:58.581286: [info] ignoring (possibly broken) abi-depends field for packages
@(src/Stack/Build/Execute.hs:453:25)
2018-10-03 23:07:58.581416: [info] Installing library in /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/lib/x86_64-osx-ghc-8.4.3/lib1-0.2.0.0-CuqIPzYUyYw8ddVMTcJt8X
@(src/Stack/Build/Execute.hs:453:25)
2018-10-03 23:07:58.581494: [info] Registering library for lib1-0.2.0.0..
@(src/Stack/Build/Execute.hs:453:25)
2018-10-03 23:07:58.581616: [info] 
--  End of log file: /private/tmp/stack-issue-4335/.stack-work/logs/lib1-0.2.0.0.log

@(src/Stack/Build/Execute.hs:454:9)
2018-10-03 23:07:58.581666: [info] Log files have been written to: /private/tmp/stack-issue-4335/.stack-work/logs/
@(src/Stack/Build/Execute.hs:406:17)
Progress 3/4

--  While building custom Setup.hs for package lib1-0.2.0.0 using:
      /Users/twer/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build test:lib1-doctests --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

Note that the same test in lib2 compiles.

stack test lib2
lib2-0.2.0.0: unregistering (components added: test:lib2-doctests)
lib2-0.2.0.0: configure (lib + test)
Configuring lib2-0.2.0.0...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
lib2-0.2.0.0: build (lib + test)
Preprocessing library for lib2-0.2.0.0..
Building library for lib2-0.2.0.0..
ignoring (possibly broken) abi-depends field for packages
Preprocessing test suite 'lib2-doctests' for lib2-0.2.0.0..
Building test suite 'lib2-doctests' for lib2-0.2.0.0..
[1 of 2] Compiling Main             ( test/Main.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/lib2-doctests/lib2-doctests-tmp/Main.o )
[2 of 2] Compiling Paths_lib2       ( .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/lib2-doctests/autogen/Paths_lib2.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/lib2-doctests/lib2-doctests-tmp/Paths_lib2.o )
Linking .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/lib2-doctests/lib2-doctests ...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
lib2-0.2.0.0: copy/register
Installing library in /private/tmp/stack-issue-4335/.stack-work/install/x86_64-osx/lts-12.11/8.4.3/lib/x86_64-osx-ghc-8.4.3/lib2-0.2.0.0-7kklPl6X3Ts6ujLTrKV7Qm
Registering library for lib2-0.2.0.0..
lib2-0.2.0.0: test (suite: lib2-doctests)

Progress 1/2: lib2-0.2.0.0x

lib2-0.2.0.0: Test suite lib2-doctests passed
Completed 2 action(s).    

Stack version

stack --version
Version 1.7.1 x86_64
Compiled with:
- Cabal-2.2.0.1
- Glob-0.9.2
- HUnit-1.6.0.0
- QuickCheck-2.11.3
- StateVar-1.1.1.0
- aeson-1.2.4.0
- aeson-compat-0.3.7.1
- annotated-wl-pprint-0.7.0
- ansi-terminal-0.8.0.2
- ansi-wl-pprint-0.6.8.2
- array-0.5.2.0
- asn1-encoding-0.9.5
- asn1-parse-0.9.4
- asn1-types-0.3.2
- async-2.2.1
- attoparsec-0.13.2.2
- attoparsec-iso8601-1.0.0.0
- auto-update-0.1.4
- base-4.11.1.0
- base-compat-0.9.3
- base-orphans-0.7
- base-prelude-1.2.0.1
- base16-bytestring-0.1.1.6
- base64-bytestring-1.0.0.1
- basement-0.0.7
- bifunctors-5.5.2
- binary-0.8.5.1
- bindings-uname-0.1
- bitarray-0.0.1.1
- blaze-builder-0.4.1.0
- blaze-html-0.9.0.1
- blaze-markup-0.8.2.1
- byteable-0.1.1
- bytestring-0.10.8.2
- call-stack-0.1.0
- case-insensitive-1.2.0.11
- cereal-0.5.5.0
- clock-0.7.2
- colour-2.3.4
- comonad-5.0.3
- conduit-1.3.0.2
- conduit-extra-1.3.0
- connection-0.2.8
- containers-0.5.11.0
- contravariant-1.4.1
- cookie-0.4.4
- cpphs-1.20.8
- cryptohash-0.11.9
- cryptohash-sha256-0.11.101.0
- cryptonite-0.25
- cryptonite-conduit-0.2.2
- data-default-class-0.1.2.0
- deepseq-1.4.3.0
- digest-0.0.1.2
- directory-1.3.1.5
- distributive-0.5.3
- dlist-0.8.0.4
- easy-file-0.2.1
- echo-0.1.3
- ed25519-0.0.5.0
- either-5
- exceptions-0.8.3
- extra-1.6.6
- fail-4.9.0.0
- fast-logger-2.4.11
- file-embed-0.0.10.1
- filelock-0.1.1.2
- filepath-1.4.2
- foundation-0.0.20
- free-5.0.1
- fsnotify-0.2.1.2
- generic-deriving-1.12.1
- ghc-boot-th-8.4.2
- ghc-prim-0.5.2.0
- gitrev-1.3.1
- hackage-security-0.5.3.0
- hashable-1.2.7.0
- haskell-src-exts-1.20.2
- haskell-src-meta-0.8.0.2
- hfsevents-0.1.6
- hourglass-0.2.11
- hpack-0.28.2
- hpc-0.6.0.3
- hspec-2.5.0
- hspec-core-2.5.0
- hspec-discover-2.5.0
- hspec-expectations-0.8.2
- hspec-smallcheck-0.5.2
- http-api-data-0.3.8.1
- http-client-0.5.12.1
- http-client-tls-0.3.5.3
- http-conduit-2.3.1
- http-types-0.12.1
- integer-gmp-1.0.2.0
- integer-logarithms-1.0.2.1
- lifted-base-0.2.3.12
- logict-0.6.0.2
- memory-0.14.16
- microlens-0.4.9.1
- microlens-th-0.4.2.1
- mime-types-0.1.0.7
- mintty-0.1.1
- monad-control-1.0.2.3
- monad-logger-0.3.28.5
- monad-loops-0.4.3
- mono-traversable-1.0.8.1
- mtl-2.2.2
- mustache-2.3.0
- neat-interpolation-0.3.2.1
- network-2.6.3.5
- network-uri-2.6.1.0
- old-locale-1.0.0.7
- old-time-1.1.0.3
- open-browser-0.2.1.0
- optparse-applicative-0.14.2.0
- optparse-simple-0.1.0
- parsec-3.1.13.0
- path-0.6.1
- path-io-1.3.3
- path-pieces-0.2.1
- pem-0.2.4
- persistent-2.8.2
- persistent-sqlite-2.8.1.2
- persistent-template-2.5.4
- polyparse-1.12
- pretty-1.1.3.6
- primitive-0.6.3.0
- process-1.6.3.0
- profunctors-5.2.2
- project-template-0.2.0.1
- quickcheck-io-0.2.0
- random-1.1
- regex-applicative-0.3.3
- regex-applicative-text-0.1.0.1
- resource-pool-0.2.3.2
- resourcet-1.2.1
- retry-0.7.6.2
- rio-0.1.1.0
- rts-1.0
- safe-0.3.17
- scientific-0.3.5.3
- semigroupoids-5.2.2
- semigroups-0.18.4
- setenv-0.1.1.3
- silently-1.2.5
- smallcheck-1.1.3.1
- socks-0.5.6
- split-0.2.3.3
- stm-2.4.5.0
- stm-chans-3.0.0.4
- store-0.4.3.2
- store-core-0.4.1
- streaming-commons-0.2.0.0
- syb-0.7
- tagged-0.8.5
- tar-0.5.1.0
- template-haskell-2.13.0.0
- temporary-1.2.1.1
- text-1.2.3.0
- text-metrics-0.3.0
- tf-random-0.5
- th-abstraction-0.2.6.0
- th-expand-syns-0.4.4.0
- th-lift-0.7.8
- th-lift-instances-0.1.11
- th-orphans-0.13.5
- th-reify-many-0.1.8
- th-utilities-0.2.0.1
- time-1.8.0.2
- time-locale-compat-0.1.1.4
- tls-1.4.1
- transformers-0.5.5.0
- transformers-base-0.4.5.2
- transformers-compat-0.6.1.6
- typed-process-0.2.2.0
- unicode-transforms-0.3.4
- unix-2.7.2.2
- unix-compat-0.5.0.1
- unix-time-0.3.8
- unliftio-0.2.7.0
- unliftio-core-0.1.1.0
- unordered-containers-0.2.9.0
- uri-bytestring-0.3.1.1
- uuid-types-1.0.3
- vector-0.12.0.1
- vector-algorithms-0.7.0.1
- void-0.7.2
- x509-1.7.3
- x509-store-1.6.6
- x509-system-1.6.6
- x509-validation-1.6.10
- yaml-0.8.29
- zip-archive-0.3.2.4
- zlib-0.6.2

Warning: this is an unsupported build that may use different versions of
dependencies and GHC than the officially released binaries, and therefore may
not behave identically.  If you encounter problems, please try the latest
official build by running 'stack upgrade --force-download'.

Method of installation

I use a stack installed from HomeBrew on macOS 10.13.6. It also fails on Linux as logged in https://travis-ci.org/Atry/stack-issue-4335/builds/436686315

mihaimaruseac commented 6 years ago

This might actually be a GHC issue. Can you try to replicate directly with cabal? This way we can check if it's caused by Stack's package resolution (unlikely) or Cabal/GHC (most likely, since Stack defers to them for actual compilation)

snoyberg commented 5 years ago

No response to previous comment, closing