File tree 2 files changed +12
-3
lines changed
ghcide/src/Development/IDE/Core
plugins/hls-eval-plugin/src/Ide/Plugin/Eval
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -686,11 +686,13 @@ loadGhcSession ghcSessionDepsConfig = do
686
686
data GhcSessionDepsConfig = GhcSessionDepsConfig
687
687
{ checkForImportCycles :: Bool
688
688
, forceLinkables :: Bool
689
+ , fullModSummary :: Bool
689
690
}
690
691
instance Default GhcSessionDepsConfig where
691
692
def = GhcSessionDepsConfig
692
693
{ checkForImportCycles = True
693
694
, forceLinkables = False
695
+ , fullModSummary = False
694
696
}
695
697
696
698
ghcSessionDepsDefinition :: GhcSessionDepsConfig -> HscEnvEq -> NormalizedFilePath -> Action (Maybe HscEnvEq )
@@ -702,7 +704,9 @@ ghcSessionDepsDefinition GhcSessionDepsConfig{..} env file = do
702
704
Nothing -> return Nothing
703
705
Just deps -> do
704
706
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)
706
710
707
711
depSessions <- map hscEnv <$> uses_ GhcSessionDeps deps
708
712
let uses_th_qq =
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ import Development.IDE (GetModSummary (..),
50
50
ModSummaryResult (.. ),
51
51
NeedsCompilation (NeedsCompilation ),
52
52
evalGhcEnv , hscEnv ,
53
+ hscEnvWithImportPaths ,
53
54
prettyPrint , runAction ,
54
55
textToStringBuffer ,
55
56
toNormalizedFilePath' ,
@@ -538,8 +539,12 @@ runGetSession st nfp = liftIO $ runAction "eval" st $ do
538
539
let fp = fromNormalizedFilePath nfp
539
540
((_, res),_) <- liftIO $ loadSessionFun fp
540
541
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
543
548
return $ fromMaybe (error $ " Unable to load file: " <> fp) res
544
549
545
550
needsQuickCheck :: [(Section , Test )] -> Bool
You can’t perform that action at this time.
0 commit comments