iu-parfunc / lvars

The LVish Haskell library
http://hackage.haskell.org/package/lvish
80 stars 14 forks source link

Cabal test is not using the same flags as cabal install? #95

Closed rrnewton closed 10 years ago

rrnewton commented 10 years ago

In logs like this one, we see the following:

v3e: [Failed]
ERROR: Final continuation of Par computation was duplicated, in spite of GET_ONCE!

In spite of the fact that getonce should be turned OFF on that run, and we clearly see that in the options passed to cabal install:

+ cabal-1.20 install --force-reinstalls --disable-library-profiling --disable-executable-profiling -f-debug -f-getonce -f-threaded -fchaselev -f-useopt --with-ghc=ghc-7.8.3 ./lvish ./par-classes ./par-collections ./par-transformers ./monad-par/monad-par/ --enable-tests -j
Resolving dependencies...

Basically, it's clear what the problem is. Cabal test is rebuilding the libraries even though it shouldn't:

+ cabal-1.20 test --show-details=streaming '--test-options=-j1 --jxml=test-results.xml --jxml-nested'
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring lvish-2.0...
Building lvish-2.0...
Preprocessing library lvish-2.0...

And therefore it just drops the flags. WHY is cabal test rebuilding when we just build everything? I have no idea. But it's clear that cabal test is not satisfactory.

rrnewton commented 10 years ago

Our temporary fix for this is to just add an extra cabal configure step.