File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
session-loader/Development/IDE Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -509,13 +509,13 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} dir = do
509
509
TargetModule _ -> do
510
510
found <- filterM (IO. doesFileExist . fromNormalizedFilePath) targetLocations
511
511
return [(targetTarget, Set. fromList found)]
512
- hasUpdate <- join $ atomically $ do
512
+ hasUpdate <- atomically $ do
513
513
known <- readTVar knownTargetsVar
514
514
let known' = flip mapHashed known $ \ k ->
515
515
HM. unionWith (<>) k $ HM. fromList knownTargets
516
516
hasUpdate = if known /= known' then Just (unhashed known') else Nothing
517
517
writeTVar knownTargetsVar known'
518
- return ( pure hasUpdate)
518
+ pure hasUpdate
519
519
for_ hasUpdate $ \ x ->
520
520
logWith recorder Debug $ LogKnownFilesUpdated x
521
521
return $ toNoFileKey GetKnownTargets
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ getFileExistsMapUntracked = do
106
106
FileExistsMapVar v <- getIdeGlobalAction
107
107
return v
108
108
109
- -- | Modify the global store of file exists.
109
+ -- | Modify the global store of file exists and return the keys that need to be mark as dirty
110
110
modifyFileExists :: IdeState -> [(NormalizedFilePath , FileChangeType )] -> IO [Key ]
111
111
modifyFileExists state changes = do
112
112
FileExistsMapVar var <- getIdeGlobalState state
Original file line number Diff line number Diff line change @@ -1225,8 +1225,9 @@ defineEarlyCutoff' doDiagnostics cmp key file mbOld mode action = do
1225
1225
return $ RunResult
1226
1226
(if eq then ChangedRecomputeSame else ChangedRecomputeDiff )
1227
1227
(encodeShakeValue bs)
1228
- (A res)
1229
- (setValues state key file res (Vector. fromList diags) >> modifyTVar' dirtyKeys (deleteKeySet $ toKey key file))
1228
+ (A res) $ do
1229
+ setValues state key file res (Vector. fromList diags)
1230
+ modifyTVar' dirtyKeys (deleteKeySet $ toKey key file)
1230
1231
return res
1231
1232
where
1232
1233
-- Highly unsafe helper to compute the version of a file
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ import Control.Concurrent.STM.Stats (dumpSTMStats)
18
18
import Control.Exception.Safe (SomeException ,
19
19
catchAny ,
20
20
displayException )
21
- import Control.Monad.Extra (concatMapM , join ,
22
- unless , when )
21
+ import Control.Monad.Extra (concatMapM , unless , when )
23
22
import Control.Monad.IO.Class (liftIO )
24
23
import qualified Data.Aeson as J
25
24
import Data.Coerce (coerce )
You can’t perform that action at this time.
0 commit comments