File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
ghcide/src/Development/IDE/Core Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -528,13 +528,15 @@ spliceExpresions Splices{..} =
528528-- can just increment the 'indexCompleted' TVar and exit.
529529--
530530indexHieFile :: ShakeExtras -> ModSummary -> NormalizedFilePath -> Fingerprint -> Compat. HieFile -> IO ()
531- indexHieFile se mod_summary srcPath hash hf = do
531+ indexHieFile se mod_summary srcPath ! hash hf = do
532532 IdeOptions {optProgressStyle} <- getIdeOptionsIO se
533533 atomically $ do
534534 pending <- readTVar indexPending
535535 case HashMap. lookup srcPath pending of
536536 Just pendingHash | pendingHash == hash -> pure () -- An index is already scheduled
537537 _ -> do
538+ -- hiedb doesn't use the Haskell src, so we clear it to avoid unnecessarily keeping it around
539+ let ! hf' = hf{hie_hs_src = mempty }
538540 modifyTVar' indexPending $ HashMap. insert srcPath hash
539541 writeTQueue indexQueue $ \ db -> do
540542 -- We are now in the worker thread
@@ -547,7 +549,7 @@ indexHieFile se mod_summary srcPath hash hf = do
547549 Just pendingHash -> pendingHash /= hash
548550 unless newerScheduled $ do
549551 pre optProgressStyle
550- addRefsFromLoaded db targetPath (RealFile $ fromNormalizedFilePath srcPath) hash hf
552+ addRefsFromLoaded db targetPath (RealFile $ fromNormalizedFilePath srcPath) hash hf'
551553 post
552554 where
553555 mod_location = ms_location mod_summary
You can’t perform that action at this time.
0 commit comments