Skip to content

Commit bfb06a3

Browse files
committed
minor fix
1 parent c31a375 commit bfb06a3

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

ghcide/session-loader/Development/IDE/Session.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,12 +610,11 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} dir = do
610610
[ "No cradle target found. Is this file listed in the targets of your cradle?"
611611
, "If you are using a .cabal file, please ensure that this module is listed in either the exposed-modules or other-modules section"
612612
]
613+
614+
void $ modifyVar' fileToFlags $ Map.insert hieYaml this_flags_map
615+
void $ modifyVar' filesMap $ flip HM.union (HM.fromList (map ((,hieYaml) . fst) $ concatMap toFlagsMap all_targets))
613616
-- The VFS doesn't change on cradle edits, re-use the old one.
614617
restartShakeSession VFSUnmodified "new component" [] $ do
615-
void $ modifyVar' fileToFlags $
616-
Map.insert hieYaml this_flags_map
617-
void $ modifyVar' filesMap $
618-
flip HM.union (HM.fromList (map ((,hieYaml) . fst) $ concatMap toFlagsMap all_targets))
619618
key1 <- extendKnownTargets all_targets
620619
key2 <- invalidateShakeCache
621620
return [key1, key2]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ modifyFileExists state changes = do
124124
let keys1 = map (toKey GetFileExists . fst) fileExistChanges
125125
let keys2 = map (toKey GetModificationTime . fst) fileModifChanges
126126
return (keys1 <> keys2)
127-
return keys
128127

129128
fromChange :: FileChangeType -> Maybe Bool
130129
fromChange FileChangeType_Created = Just True

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,8 @@ typecheckParentsAction recorder nfp = do
250250
setSomethingModified :: VFSModified -> IdeState -> String -> IO [Key] -> IO ()
251251
setSomethingModified vfs state reason actionBetweenSession = do
252252
-- Update database to remove any files that might have been renamed/deleted
253-
void $ restartShakeSession (shakeExtras state) vfs reason [] $ do
254-
keys <- actionBetweenSession
255-
atomically $ writeTQueue (indexQueue $ hiedbWriter $ shakeExtras state) (\withHieDb -> withHieDb deleteMissingRealFiles)
256-
return keys
253+
atomically $ writeTQueue (indexQueue $ hiedbWriter $ shakeExtras state) (\withHieDb -> withHieDb deleteMissingRealFiles)
254+
void $ restartShakeSession (shakeExtras state) vfs reason [] actionBetweenSession
257255

258256
registerFileWatches :: [String] -> LSP.LspT Config IO Bool
259257
registerFileWatches globs = do

0 commit comments

Comments
 (0)