Skip to content

Commit

Permalink
push known targets back to session restart
Browse files Browse the repository at this point in the history
  • Loading branch information
soulomoon committed May 6, 2024
1 parent 013650b commit e10d135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ghcide/session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} dir = do

void $ modifyVar' fileToFlags $ Map.insert hieYaml this_flags_map
void $ modifyVar' filesMap $ flip HM.union (HM.fromList (map ((,hieYaml) . fst) $ concatMap toFlagsMap all_targets))
key1 <- extendKnownTargets all_targets
-- The VFS doesn't change on cradle edits, re-use the old one.
-- Invalidate all the existing GhcSession build nodes by restarting the Shake session
restartShakeSession VFSUnmodified "new component" [] $ do
key1 <- extendKnownTargets all_targets
key2 <- invalidateShakeCache
return [key1, key2]

Expand Down

0 comments on commit e10d135

Please sign in to comment.