From a8c13f19b98e593d8820dd9a1964c070c1c0de3d Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Mon, 26 Dec 2022 16:36:11 +0530 Subject: [PATCH] Strictness for !fullModuleGraph --- ghcide/src/Development/IDE/Core/Rules.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghcide/src/Development/IDE/Core/Rules.hs b/ghcide/src/Development/IDE/Core/Rules.hs index cd5f59ba7e7..1d50b9d3388 100644 --- a/ghcide/src/Development/IDE/Core/Rules.hs +++ b/ghcide/src/Development/IDE/Core/Rules.hs @@ -66,6 +66,7 @@ import Control.Concurrent.Async (concurrently) import Control.Concurrent.Strict import Control.DeepSeq import Control.Exception.Safe +import Control.Exception (evaluate) import Control.Monad.Extra import Control.Monad.Reader import Control.Monad.State @@ -824,7 +825,8 @@ ghcSessionDepsDefinition fullModSummary GhcSessionDepsConfig{..} env file = do #endif nubOrdOn ms_mod (ms : concatMap mgModSummaries mgs) #endif - pure $ mkModuleGraph module_graph_nodes + liftIO $ evaluate $ liftRnf rwhnf module_graph_nodes + return $ mkModuleGraph module_graph_nodes session' <- liftIO $ mergeEnvs hsc mg ms inLoadOrder depSessions -- Here we avoid a call to to `newHscEnvEqWithImportPaths`, which creates a new