File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
ghcide/src/Development/IDE/Core
plugins/hls-eval-plugin/src/Ide/Plugin/Eval Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -686,11 +686,13 @@ loadGhcSession ghcSessionDepsConfig = do
686686data GhcSessionDepsConfig = GhcSessionDepsConfig
687687 { checkForImportCycles :: Bool
688688 , forceLinkables :: Bool
689+ , fullModSummary :: Bool
689690 }
690691instance Default GhcSessionDepsConfig where
691692 def = GhcSessionDepsConfig
692693 { checkForImportCycles = True
693694 , forceLinkables = False
695+ , fullModSummary = False
694696 }
695697
696698ghcSessionDepsDefinition :: GhcSessionDepsConfig -> HscEnvEq -> NormalizedFilePath -> Action (Maybe HscEnvEq )
@@ -702,7 +704,9 @@ ghcSessionDepsDefinition GhcSessionDepsConfig{..} env file = do
702704 Nothing -> return Nothing
703705 Just deps -> do
704706 when checkForImportCycles $ void $ uses_ ReportImportCycles deps
705- ms: mss <- map msrModSummary <$> uses_ GetModSummaryWithoutTimestamps (file: deps)
707+ ms: mss <- map msrModSummary <$> if fullModSummary
708+ then uses_ GetModSummary (file: deps)
709+ else uses_ GetModSummaryWithoutTimestamps (file: deps)
706710
707711 depSessions <- map hscEnv <$> uses_ GhcSessionDeps deps
708712 let uses_th_qq =
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ import Development.IDE (GetModSummary (..),
5050 ModSummaryResult (.. ),
5151 NeedsCompilation (NeedsCompilation ),
5252 evalGhcEnv , hscEnv ,
53+ hscEnvWithImportPaths ,
5354 prettyPrint , runAction ,
5455 textToStringBuffer ,
5556 toNormalizedFilePath' ,
@@ -538,8 +539,12 @@ runGetSession st nfp = liftIO $ runAction "eval" st $ do
538539 let fp = fromNormalizedFilePath nfp
539540 ((_, res),_) <- liftIO $ loadSessionFun fp
540541 let env = fromMaybe (error $ " Unknown file: " <> fp) res
541- ghcSessionDepsConfig = def{forceLinkables = True , checkForImportCycles = False }
542- res <- fmap hscEnv <$> ghcSessionDepsDefinition ghcSessionDepsConfig env nfp
542+ ghcSessionDepsConfig = def
543+ { forceLinkables = True
544+ , checkForImportCycles = False
545+ , fullModSummary = True
546+ }
547+ res <- fmap hscEnvWithImportPaths <$> ghcSessionDepsDefinition ghcSessionDepsConfig env nfp
543548 return $ fromMaybe (error $ " Unable to load file: " <> fp) res
544549
545550needsQuickCheck :: [(Section , Test )] -> Bool
You can’t perform that action at this time.
0 commit comments