Skip to content

Commit fdbb7aa

Browse files
committed
fix
1 parent 13528d7 commit fdbb7aa

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

ghcide/src/Development/IDE/Core/Shake.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,8 @@ shakeRestart recorder IdeState{..} vfs reason acts ioActionBetweenShakeSession =
766766
shakeSession
767767
(\runner -> do
768768
(stopTime,()) <- duration $ logErrorAfter 10 $ cancelShakeSession runner
769-
res <- shakeDatabaseProfile shakeDb
770769
ioActionBetweenShakeSession
770+
res <- shakeDatabaseProfile shakeDb
771771
backlog <- readTVarIO $ dirtyKeys shakeExtras
772772
queue <- atomicallyNamed "actionQueue - peek" $ peekInProgress $ actionQueue shakeExtras
773773

plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ needs to be re-parsed. That's what we do when we record the dirty key that our p
130130
rule depends on.
131131
Then we restart the shake session, so that changes to our virtual files are actually picked up.
132132
-}
133-
restartCabalShakeSession :: ShakeExtras -> VFS.VFS -> NormalizedFilePath -> String -> IO ()
134-
restartCabalShakeSession shakeExtras vfs file actionMsg = do
135-
restartShakeSession shakeExtras (VFSModified vfs) (fromNormalizedFilePath file ++ " " ++ actionMsg) [] $
133+
restartCabalShakeSession :: ShakeExtras -> VFS.VFS -> NormalizedFilePath -> String -> IO () -> IO ()
134+
restartCabalShakeSession shakeExtras vfs file actionMsg actionBetweenSession = do
135+
restartShakeSession shakeExtras (VFSModified vfs) (fromNormalizedFilePath file ++ " " ++ actionMsg) [] $ do
136+
actionBetweenSession
136137
join $ atomically $ Shake.recordDirtyKeys shakeExtras GetModificationTime [file]
137138

138139
-- ----------------------------------------------------------------

plugins/hls-eval-plugin/src/Ide/Plugin/Eval/CodeLens.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,8 @@ runEvalCmd recorder plId st mtoken EvalParams{..} =
211211

212212
-- enable codegen for the module which we need to evaluate.
213213
final_hscEnv <- liftIO $ bracket_
214-
(do queueForEvaluation st nfp
215-
setSomethingModified VFSUnmodified st [toKey IsEvaluating nfp] "Eval")
216-
(do unqueueForEvaluation st nfp
217-
setSomethingModified VFSUnmodified st [toKey IsEvaluating nfp] "Eval")
214+
(setSomethingModified VFSUnmodified st [toKey IsEvaluating nfp] "Eval" $ queueForEvaluation st nfp)
215+
(setSomethingModified VFSUnmodified st [toKey IsEvaluating nfp] "Eval" $ unqueueForEvaluation st nfp)
218216
(initialiseSessionForEval (needsQuickCheck tests) st nfp)
219217

220218
evalCfg <- liftIO $ runAction "eval: config" st $ getEvalConfig plId

0 commit comments

Comments
 (0)