Skip to content

Commit

Permalink
Disable getDocs call with ghc-lib (haskell/ghcide#342)
Browse files Browse the repository at this point in the history
This has caused a bunch of issues in DAML where GHC seems to randomly
panics when completions are requested, see
digital-asset/daml#4152 for the error. I am
not entirely sure what is going wrong there but `getDocs` also goes
through the GHCi codepaths which are known to cause issues with
ghc-lib so for now, let’s disable it.
  • Loading branch information
cocreature authored Jan 23, 2020
1 parent c28ba2d commit f7ebc0d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ghcide/src/Development/IDE/Spans/Documentation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ getDocumentationTryGhc
=> [TypecheckedModule]
-> Name
-> m SpanDoc
#if MIN_GHC_API_VERSION(8,6,0)
-- getDocs goes through the GHCi codepaths which cause problems on ghc-lib.
-- See https://github.com/digital-asset/daml/issues/4152 for more details.
#if MIN_GHC_API_VERSION(8,6,0) && !defined(GHC_LIB)
getDocumentationTryGhc tcs name = do
res <- catchSrcErrors "docs" $ getDocs name
case res of
Expand Down Expand Up @@ -108,4 +110,4 @@ docHeaders = mapMaybe (\(L _ x) -> wrk x)
AnnLineComment s -> if "-- |" `isPrefixOf` s
then Just $ T.pack s
else Nothing
_ -> Nothing
_ -> Nothing

0 comments on commit f7ebc0d

Please sign in to comment.