commercialhaskell / stack

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

Stack build dependencies in wrong order and fails #777

Closed kfigiela closed 9 years ago

kfigiela commented 9 years ago

I am using ghcjs (see: https://github.com/commercialhaskell/stack/issues/337), so that I needed to use ghc-7.10 resolver and all dependencies are listed as extra-deps. I'm submitting it as separate issue as I think it may be general one (not ghcjs-specific).

For some reason stack does not build tf-random before QuickCheck package. Both packages are listed as extra-deps. The only way for me to build dependencies is to run stack build --keep-going, as soon as tf-random is installed by stack, then the next time it will succeed with QuickCheck and the rest of the project.

$ stack build -j 1

...[a lot of packages building]...

QuickCheck-2.8.1: configure
Progress: 34/78
--  While building package QuickCheck-2.8.1 using:
      /usr/local/bin/runhaskell -package=Cabal-1.22.4.0 -clear-package-db -global-package-db -package-db=/Users/kamilfigiela/.stack/snapshots/x86_64-osx/ghc-7.10/7.10.2-ghcjs/pkgdb/ /var/folders/pc/79dcz63d0zl123lf9zjfj5xc0000gn/T/stack86536/Setup.hs --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ configure --user --package-db=clear --package-db=global --package-db=/Users/kamilfigiela/.stack/snapshots/x86_64-osx/ghc-7.10/7.10.2-ghcjs/pkgdb/ --package-db=/Users/kamilfigiela/NewByteOrder/development/new_byte_order/build_ghcjs/libs/nodelab/.stack-work/install/x86_64-osx/ghc-7.10/7.10.2-ghcjs/pkgdb/ --dependency=base=base-4.8.0.0-0a176ccc3ac6b2501c41acec610f12b1 --dependency=containers=containers-0.5.6.3-001e48de369b2ce3a2568751f6fa2c59 --dependency=random=random-1.1-8d0c95512a7414390c160a7c293b9301 --libdir=/Users/kamilfigiela/NewByteOrder/development/new_byte_order/build_ghcjs/libs/nodelab/.stack-work/install/x86_64-osx/ghc-7.10/7.10.2-ghcjs/lib --bindir=/Users/kamilfigiela/NewByteOrder/development/new_byte_order/build_ghcjs/libs/nodelab/.stack-work/install/x86_64-osx/ghc-7.10/7.10.2-ghcjs/bin --datadir=/Users/kamilfigiela/NewByteOrder/development/new_byte_order/build_ghcjs/libs/nodelab/.stack-work/install/x86_64-osx/ghc-7.10/7.10.2-ghcjs/share --docdir=/Users/kamilfigiela/NewByteOrder/development/new_byte_order/build_ghcjs/libs/nodelab/.stack-work/install/x86_64-osx/ghc-7.10/7.10.2-ghcjs/doc/QuickCheck-2.8.1 --htmldir=/Users/kamilfigiela/NewByteOrder/development/new_byte_order/build_ghcjs/libs/nodelab/.stack-work/install/x86_64-osx/ghc-7.10/7.10.2-ghcjs/doc/QuickCheck-2.8.1 --haddockdir=/Users/kamilfigiela/NewByteOrder/development/new_byte_order/build_ghcjs/libs/nodelab/.stack-work/install/x86_64-osx/ghc-7.10/7.10.2-ghcjs/doc/QuickCheck-2.8.1 --ghcjs
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/kamilfigiela/NewByteOrder/development/new_byte_order/build_ghcjs/libs/nodelab/.stack-work/logs/QuickCheck-2.8.1.log

    Configuring QuickCheck-2.8.1...
    Setup.hs: At least the following dependencies are missing:
    tf-random >=0.4

stack.yaml:

resolver: ghc-7.10
use-ghcjs: true
packages:
  - [our packages]
  - ...
extra-deps:
  - HUnit-1.2.5.2
  - MissingH-1.3.0.1
  - MonadRandom-0.4
  - QuickCheck-2.8.1
  - StateVar-1.1.0.1
  - adjunctions-4.2.1
  - ansi-terminal-0.6.2.1
  - ansi-wl-pprint-0.6.7.2
  - base-4.8.0.0
  - base-orphans-0.4.3
  - bifunctors-5
  - colour-2.3.3
  - comonad-4.2.7.2
  - cond-0.4.1.1
  - constraints-0.4.1.3
  - contravariant-1.3.2
  - convertible-1.1.1.0
  - data-default-0.5.3
  - data-default-class-0.0.1
  - data-default-instances-base-0.0.1
  - data-default-instances-containers-0.0.1
  - data-default-instances-dlist-0.0.1
  - data-default-instances-old-locale-0.0.1
  - distributive-0.4.4
  - either-4.4.1
  - errors-1.4.7
  - exceptions-0.8.0.2
  - free-4.12.1
  - generic-deriving-1.8.0
  - ghcjs-dom-0.2.1.0
  - haskell-lexer-1.0
  - hslogger-1.2.9
  - hspec-2.1.10
  - hspec-core-2.1.10
  - hspec-discover-2.1.10
  - hspec-expectations-0.7.1
  - kan-extensions-4.2.2
  - lens-4.12.3
  - mmorph-1.0.4
  - monad-control-1.0.0.4
  - monad-loops-0.4.3
  - nats-1
  - network-2.6.2.1
  - newtype-0.2
  - optparse-applicative-0.11.0.2
  - parsec-3.1.9
  - polyparse-1.11
  - prelude-extras-0.4
  - pretty-show-1.6.8.2
  - profunctors-5.1.1
  - protocol-buffers-2.1.4
  - psqueues-0.2.0.2
  - quickcheck-io-0.1.1
  - random-1.1
  - reactive-banana-0.8.1.2
  - reflection-2
  - regex-base-0.93.2
  - regex-compat-0.95.1
  - regex-posix-0.95.2
  - safe-0.3.9
  - semigroupoids-5.0.0.3
  - semigroups-0.16.2.2
  - setenv-0.1.1.3
  - split-0.2.2
  - tagged-0.8.1
  - temporary-1.2.0.3
  - tf-random-0.5
  - transformers-base-0.4.4
  - transformers-compat-0.4.0.4
  - utf8-string-1
  - vault-0.3.0.4
  - void-0.7
  - wl-pprint-text-1.1.0.4
snoyberg commented 9 years ago

Please provide a repro that does not use ghcjs, that code is experimental.

mgsloan commented 9 years ago

@kfigiela I've updated the 337-ghcjs branch with a much better implementation. If you use that branch and resolver ghcjs-0.1.0_ghc-7.10.2, does it work?

kfigiela commented 9 years ago

@mgsloan, today we installed the new implementation nad problem no longer occurs. Thanks! I'm closing this issue.