@@ -203,10 +203,6 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
203203 . withTSem sbSem
204204 wfd libComps buildLibrary
205205
206− -- Even if the tests later fail, we can allow other libraries to build
207− -- on top of our successful results
208− atomically $ putTMVar (piResult sbPackageInfo) True
209−
210206 wfd testComps runTests
211207
212208 name = display $ piName sbPackageInfo
@@ -232,10 +228,13 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
232228
233229 log' t = do
234230 i <- readTVarIO sbActive
231+ errs <- readTVarIO sbErrsVar
235232 pbLog $ encodeUtf8 $ concat
236233 [ t
237− , " (active: "
234+ , " (pending: "
238235 , tshow i
236+ , ", failures: "
237+ , tshow $ length errs
239238 , ")\n"
240239 ]
241240 libOut = pbLogDir </> fpFromText namever </> "build.out"
@@ -285,7 +284,11 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
285284 withMVar sbRegisterMutex $ const $
286285 run "cabal" ["register"]
287286
288− when (pcHaddocks /= Don'tBuild) $ do
287+ -- Even if the tests later fail, we can allow other libraries to build
288+ -- on top of our successful results
289+ atomically $ putTMVar (piResult sbPackageInfo) True
290+
291+ when (pcHaddocks /= Don'tBuild && hasLibrary (ppDesc $ piPlan sbPackageInfo)) $ do
289292 log' $ "Haddocks " ++ namever
290293 hfs <- readTVarIO sbHaddockFiles
291294 let hfsOpts = flip map (mapToList hfs) $ \(pkgVer, hf) -> concat
@@ -359,6 +362,12 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
359362 Just bf -> bf
360363 Nothing -> BuildFailureException exc
361364
365+hasLibrary :: SimpleDesc -> Bool
366+hasLibrary sd =
367+ any go (sdPackages sd) || any go (sdTools sd)
368+ where
369+ go = (CompLibrary `member`) . diComponents
370+
362371renameOrCopy :: FilePath -> FilePath -> IO ()
363372renameOrCopy src dest = rename src dest `catchIO` \_ -> copyDir src dest
364373