@@ -367,8 +367,10 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} =
367 writeIORef isConfiged True
367 writeIORef isConfiged True
370+ prevBuildResult <- getPreviousResult pb Build pident
371+ unless (prevBuildResult == PRSuccess) $ withConfiged $ do
370− unless (pname `member` registeredPackages) $ withConfiged $ do
372+ assert (pname `notMember` registeredPackages) $ do
371− deletePreviousResults pb pname
373+ deletePreviousResults pb pident
373 log' $ "Building " ++ namever
375 log' $ "Building " ++ namever
374 run "cabal" ["build"]
376 run "cabal" ["build"]
@@ -378,6 +380,8 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} =
378 withMVar sbRegisterMutex $ const $
380 withMVar sbRegisterMutex $ const $
379 run "cabal" ["register"]
381 run "cabal" ["register"]
383+ savePreviousResult pb Build pident True
381 -- Even if the tests later fail, we can allow other libraries to build
385 -- Even if the tests later fail, we can allow other libraries to build
382 -- on top of our successful results
386 -- on top of our successful results
@@ -497,7 +501,7 @@ copyBuiltInHaddocks docdir = do
497------------- Previous results
501------------- Previous results
499-- | The previous actions that can be run
503-- | The previous actions that can be run
500−data ResultType = Haddock | Test
504+data ResultType = Build | Haddock | Test
501 deriving (Show, Enum, Eq, Ord, Bounded, Read)
505 deriving (Show, Enum, Eq, Ord, Bounded, Read)
503-- | The result generated on a previous run
507-- | The result generated on a previous run