File for store build results

This commit is contained in:
Michael Snoyman 2015-03-13 08:40:16 +02:00
parent 351c03b881
commit cd0e717aab

View File

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