Skip to content

Commit

Permalink
We again build documentation in case of proper source errors (#253)
Browse files Browse the repository at this point in the history
and only refuse building it in case of "GHC server died (dummy error)".
We are in no position to decide if partial documentation should be built
or not. Let the user of our API decide --- he has access to all relevant
information, in particular, to errors.
  • Loading branch information
Mikolaj committed Sep 13, 2014
1 parent f89ae08 commit 5f6b015
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions IdeSession/Update/ExecuteSessionUpdate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,14 @@ executeBuildDoc = do
Nothing ->
error "This session state does not admit artifact generation."
Just Computed{computedErrors} -> toLazyList computedErrors
isDummyError err =
errorKind err == KindError
&& errorMsg err == Text.pack "GHC server died (dummy error)"
exitCode <-
if any (== KindError) $ map errorKind errors then do
if any isDummyError errors then do
exceptionFree $ do
writeFile beStderrLog
"Source or other errors encountered. Not attempting to build documentation."
"GHC server died. Not attempting to build documentation."
return $ ExitFailure 1
else exceptionFree $ do
(loadedMs, pkgs) <- buildDeps mcomputed
Expand Down

0 comments on commit 5f6b015

Please sign in to comment.