From 1baaca17e895cdfec4d1dbb85916e5596d29079a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 18 Aug 2015 18:14:34 +0300 Subject: [PATCH] Build libs/executables even when running tests/benchmarks #805 --- src/Stack/Build/ConstructPlan.hs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Stack/Build/ConstructPlan.hs b/src/Stack/Build/ConstructPlan.hs index 01aa482ed9..a0cf273761 100644 --- a/src/Stack/Build/ConstructPlan.hs +++ b/src/Stack/Build/ConstructPlan.hs @@ -132,20 +132,13 @@ constructPlan mbp0 baseConfigOpts0 locals extraToBuild0 locallyRegistered loadPa econfig <- asks getEnvConfig let onWanted lp = do - {- - - Arguably this is the right thing to do. However, forcing the - - library to rebuild causes the cabal_macros.h file to change, - - which makes GHC rebuild everything... - case lpExeComponents lp of Nothing -> return () - Just _ -> void $ addDep $ packageName $ lpPackage lp - -} + Just _ -> void $ addDep False $ packageName $ lpPackage lp case lpTestBench lp of Just tb -> addFinal lp tb - -- See comment above - Nothing -> void $ addDep False $ packageName $ lpPackage lp + Nothing -> return () let inner = do mapM_ onWanted $ filter lpWanted locals mapM_ (addDep False) $ Set.toList extraToBuild0