Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ghcide/src/Development/IDE/Core/Shake.hs
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ defineEarlyCutoff'
-> Action (Maybe BS.ByteString, IdeResult v)
-> Action (RunResult (A (RuleResult k)))
defineEarlyCutoff' doDiagnostics key file old mode action = do
extras@ShakeExtras{state, inProgress} <- getShakeExtras
extras@ShakeExtras{state, inProgress, logger} <- getShakeExtras
options <- getIdeOptions
(if optSkipProgress options key then id else withProgressVar inProgress file) $ do
val <- case old of
Expand Down Expand Up @@ -974,8 +974,9 @@ defineEarlyCutoff' doDiagnostics key file old mode action = do
(toShakeValue ShakeResult bs, Failed b)
Just v -> pure (maybe ShakeNoCutoff ShakeResult bs, Succeeded (vfsVersion =<< modTime) v)
liftIO $ setValues state key file res (Vector.fromList diags)
when doDiagnostics $
updateFileDiagnostics file (Key key) extras $ map (\(_,y,z) -> (y,z)) diags
if doDiagnostics
then updateFileDiagnostics file (Key key) extras $ map (\(_,y,z) -> (y,z)) diags
else forM_ diags $ \d -> liftIO $ logWarning logger $ showDiagnosticsColored [d]
let eq = case (bs, fmap decodeShakeValue old) of
(ShakeResult a, Just (ShakeResult b)) -> a == b
(ShakeStale a, Just (ShakeStale b)) -> a == b
Expand Down