Skip to content

Commit 0a4f695

Browse files
committed
fix
1 parent fa2c7c1 commit 0a4f695

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -739,17 +739,19 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir = do
739739
catchError file hieYaml $ do
740740
result@(_, deps) <- consultCradle file
741741
-- add the deps to the Shake graph
742-
let addDependency fp = do
743-
-- VSCode uses absolute paths in its filewatch notifications
744-
let nfp = toNormalizedFilePath' fp
745-
itExists <- getFileExists nfp
746-
when itExists $ void $ do use_ GetModificationTime nfp
747742
mapM_ addDependency deps
748743
return $ Just result
749744
where
750745
catchError file hieYaml f =
751-
f `Safe.catch` \e ->
746+
f `Safe.catch` \e -> do
747+
-- install dep so it can be recorvered
748+
mapM_ addDependency hieYaml
752749
return $ Just (([renderPackageSetupException file e], Nothing), maybe [] pure hieYaml)
750+
addDependency fp = do
751+
-- VSCode uses absolute paths in its filewatch notifications
752+
let nfp = toNormalizedFilePath' fp
753+
itExists <- getFileExists nfp
754+
when itExists $ void $ do use_ GetModificationTime nfp
753755

754756
cradleLocRule :: Rules ()
755757
cradleLocRule = defineNoDiagnostics (cmapWithPrio LogShake recorder) $ \CradleLoc file -> do

0 commit comments

Comments
 (0)