From c21ce098cad1981bf2da656a6a844ac1a4963b7f Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 27 Oct 2024 19:06:43 +0800 Subject: [PATCH] remove dup when type checking all files in the project on startup --- ghcide/session-loader/Development/IDE/Session.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide/session-loader/Development/IDE/Session.hs b/ghcide/session-loader/Development/IDE/Session.hs index d1ccdc53b0..599d1ea1dc 100644 --- a/ghcide/session-loader/Development/IDE/Session.hs +++ b/ghcide/session-loader/Development/IDE/Session.hs @@ -578,7 +578,7 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do -- Typecheck all files in the project on startup checkProject <- getCheckProject unless (null new_deps || not checkProject) $ do - cfps' <- liftIO $ filterM (IO.doesFileExist . fromNormalizedFilePath) (concatMap targetLocations all_targets) + cfps' <- liftIO $ filterM (IO.doesFileExist . fromNormalizedFilePath) (nub $ concatMap targetLocations all_targets) void $ shakeEnqueue extras $ mkDelayedAction "InitialLoad" Debug $ void $ do mmt <- uses GetModificationTime cfps' let cs_exist = catMaybes (zipWith (<$) cfps' mmt)