@@ -893,13 +893,7 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
893
893
checkInCache ncfp = runMaybeT $ do
894
894
cachedHieYamlLocation <- MaybeT $ STM. lookup ncfp (filesMap sessionState)
895
895
m <- MaybeT $ STM. lookup cachedHieYamlLocation (fileToFlags sessionState)
896
- -- Each one of deps will be registered as a FileSystemWatcher in the GhcSession action
897
- -- so that we can get a workspace/didChangeWatchedFiles notification when a dep changes.
898
- -- The GlobPattern of a FileSystemWatcher can be absolute or relative.
899
- -- We use the absolute one because it is supported by more LSP clients.
900
- -- Here we make sure deps are absolute and later we use those absolute deps as GlobPattern.
901
- let absolutePathsCradleDeps (eq, deps) = (eq, fmap toAbsolutePath deps)
902
- MaybeT $ pure $ absolutePathsCradleDeps <$> HM. lookup ncfp m
896
+ MaybeT $ pure $ HM. lookup ncfp m
903
897
904
898
-- The main function which gets options for a file. We only want one of these running
905
899
-- at a time. Therefore the IORef contains the currently running cradle, if we try
@@ -947,9 +941,16 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
947
941
-- see Note [Serializing runs in separate thread]
948
942
-- Start the getOptionsLoop if the queue is empty
949
943
liftIO $ atomically $ Extra. whenM (isEmptyTQueue que) $ writeTQueue que getOptionsLoop
944
+
945
+ -- Each one of deps will be registered as a FileSystemWatcher in the GhcSession action
946
+ -- so that we can get a workspace/didChangeWatchedFiles notification when a dep changes.
947
+ -- The GlobPattern of a FileSystemWatcher can be absolute or relative.
948
+ -- We use the absolute one because it is supported by more LSP clients.
949
+ -- Here we make sure deps are absolute and later we use those absolute deps as GlobPattern.
950
+ let absolutePathsCradleDeps (eq, deps) = (eq, fmap toAbsolutePath $ Map. keys deps)
950
951
returnWithVersion $ \ file -> do
951
952
let absFile = toAbsolutePath file
952
- second Map. keys <$> lookupOrWaitCache absFile
953
+ absolutePathsCradleDeps <$> lookupOrWaitCache absFile
953
954
954
955
-- | Run the specific cradle on a specific FilePath via hie-bios.
955
956
-- This then builds dependencies or whatever based on the cradle, gets the
0 commit comments