Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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/session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,10 @@ loadSessionWithOptions SessionLoadingOptions{..} dir = do
return $ do
extras@ShakeExtras{logger, restartShakeSession, ideNc, knownTargetsVar, lspEnv
} <- getShakeExtras
let invalidateShakeCache = do
let invalidateShakeCache :: IO ()
invalidateShakeCache = do
void $ modifyVar' version succ
atomically $ recordDirtyKeys extras GhcSessionIO [emptyFilePath]
join $ atomically $ recordDirtyKeys extras GhcSessionIO [emptyFilePath]

IdeOptions{ optTesting = IdeTesting optTesting
, optCheckProject = getCheckProject
Expand All @@ -264,7 +265,7 @@ loadSessionWithOptions SessionLoadingOptions{..} dir = do
TargetModule _ -> do
found <- filterM (IO.doesFileExist . fromNormalizedFilePath) targetLocations
return (targetTarget, found)
atomically $ recordDirtyKeys extras GetKnownTargets [emptyFilePath]
join $ atomically $ recordDirtyKeys extras GetKnownTargets [emptyFilePath]
modifyVarIO' knownTargetsVar $ traverseHashed $ \known -> do
let known' = HM.unionWith (<>) known $ HM.fromList $ map (second Set.fromList) knownTargets
when (known /= known') $
Expand Down
2 changes: 1 addition & 1 deletion ghcide/src/Development/IDE/Core/FileStore.hs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ setFileModified state saved nfp = do
VFSHandle{..} <- getIdeGlobalState state
when (isJust setVirtualFileContents) $
fail "setFileModified can't be called on this type of VFSHandle"
atomically $ recordDirtyKeys (shakeExtras state) GetModificationTime [nfp]
join $ atomically $ recordDirtyKeys (shakeExtras state) GetModificationTime [nfp]
restartShakeSession (shakeExtras state) (fromNormalizedFilePath nfp ++ " (modified)") []
when checkParents $
typecheckParents state nfp
Expand Down