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
509509 TargetModule _ -> do
510510 found <- filterM (IO. doesFileExist . fromNormalizedFilePath) targetLocations
511511 return [(targetTarget, Set. fromList found)]
512- hasUpdate <- join $ atomically $ do
512+ hasUpdate <- atomically $ do
513513 known <- readTVar knownTargetsVar
514514 let known' = flip mapHashed known $ \ k ->
515515 HM. unionWith (<>) k $ HM. fromList knownTargets
516516 hasUpdate = if known /= known' then Just (unhashed known') else Nothing
517517 writeTVar knownTargetsVar known'
518- return ( pure hasUpdate)
518+ pure hasUpdate
519519 for_ hasUpdate $ \ x ->
520520 logWith recorder Debug $ LogKnownFilesUpdated x
521521 return $ toNoFileKey GetKnownTargets
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ getFileExistsMapUntracked = do
106106 FileExistsMapVar v <- getIdeGlobalAction
107107 return v
108108
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
110110modifyFileExists :: IdeState -> [(NormalizedFilePath , FileChangeType )] -> IO [Key ]
111111modifyFileExists state changes = do
112112 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
12251225 return $ RunResult
12261226 (if eq then ChangedRecomputeSame else ChangedRecomputeDiff )
12271227 (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)
12301231 return res
12311232 where
12321233 -- 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)
1818import Control.Exception.Safe (SomeException ,
1919 catchAny ,
2020 displayException )
21- import Control.Monad.Extra (concatMapM , join ,
22- unless , when )
21+ import Control.Monad.Extra (concatMapM , unless , when )
2322import Control.Monad.IO.Class (liftIO )
2423import qualified Data.Aeson as J
2524import Data.Coerce (coerce )
You can’t perform that action at this time.
0 commit comments