on master help sign in
Disable getDocs call with ghc-lib (#342)

This has caused a bunch of issues in DAML where GHC seems to randomly panics when completions are requested, see https://github.com/digital-asset/daml/issues/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.

commit8f74783835324ee6dad7faf83b7a62143a48e8c6 authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org> dateThu 23 Jan 2020, 17:50 (7 years ago) parent2154bb2
1 file changed+4−2
src/Development/IDE/Spans/Documentation.hs+4−2
src/Development/IDE/Spans/Documentation.hs+4−2
@@ -26,7 +26,9 @@ getDocumentationTryGhc
2626 => [TypecheckedModule]
2727 -> Name
2828 -> m SpanDoc
29−#if MIN_GHC_API_VERSION(8,6,0)
29+-- getDocs goes through the GHCi codepaths which cause problems on ghc-lib.
30+-- See https://github.com/digital-asset/daml/issues/4152 for more details.
31+#if MIN_GHC_API_VERSION(8,6,0) && !defined(GHC_LIB)
3032getDocumentationTryGhc tcs name = do
3133 res <- catchSrcErrors "docs" $ getDocs name
3234 case res of
@@ -108,4 +110,4 @@ docHeaders = mapMaybe (\(L _ x) -> wrk x)
108110 AnnLineComment s -> if "-- |" `isPrefixOf` s
109111 then Just $ T.pack s
110112 else Nothing
111− _ -> Nothing
113+ _ -> Nothing