File tree 1 file changed +10
-3
lines changed
ghcide/src/Development/IDE/Core
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -697,9 +697,16 @@ loadGhcSession ghcSessionDepsConfig = do
697
697
Nothing -> LBS. toStrict $ B. encode (hash (snd val))
698
698
return (Just cutoffHash, val)
699
699
700
- defineNoDiagnostics $ \ (GhcSessionDeps_ fullModSummary) file -> do
701
- env <- use_ GhcSession file
702
- ghcSessionDepsDefinition fullModSummary ghcSessionDepsConfig env file
700
+ defineEarlyCutoff $ RuleWithCustomNewnessCheck (<=) $
701
+ -- This rule uses a custom newness check that relies on the derived 'Ord' instance:
702
+ -- * <previous> -> <new>
703
+ -- * GhcSessionDeps True -> GhcSessionDeps False: the prev session can be reused
704
+ -- * GhcSessionDeps False -> GhcSessionDeps True: the prev session cannot be reused
705
+ \ (GhcSessionDeps_ fullModSummary) file -> do
706
+ env <- use_ GhcSession file
707
+ res <- ghcSessionDepsDefinition fullModSummary ghcSessionDepsConfig env file
708
+ return (Nothing , res)
709
+
703
710
704
711
newtype GhcSessionDepsConfig = GhcSessionDepsConfig
705
712
{ checkForImportCycles :: Bool
You can’t perform that action at this time.
0 commit comments