File tree 2 files changed +5
-3
lines changed 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ cabal-version: 2.4
2
2
build-type : Simple
3
3
category : Development
4
4
name : ghcide
5
- version : 1.4.0.1
5
+ version : 1.4.0.2
6
6
license : Apache-2.0
7
7
license-file : LICENSE
8
8
author : Digital Asset and Ghcide contributors
Original file line number Diff line number Diff line change @@ -528,13 +528,15 @@ spliceExpresions Splices{..} =
528
528
-- can just increment the 'indexCompleted' TVar and exit.
529
529
--
530
530
indexHieFile :: 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
532
532
IdeOptions {optProgressStyle} <- getIdeOptionsIO se
533
533
atomically $ do
534
534
pending <- readTVar indexPending
535
535
case HashMap. lookup srcPath pending of
536
536
Just pendingHash | pendingHash == hash -> pure () -- An index is already scheduled
537
537
_ -> 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 }
538
540
modifyTVar' indexPending $ HashMap. insert srcPath hash
539
541
writeTQueue indexQueue $ \ db -> do
540
542
-- We are now in the worker thread
@@ -547,7 +549,7 @@ indexHieFile se mod_summary srcPath hash hf = do
547
549
Just pendingHash -> pendingHash /= hash
548
550
unless newerScheduled $ do
549
551
pre optProgressStyle
550
- addRefsFromLoaded db targetPath (RealFile $ fromNormalizedFilePath srcPath) hash hf
552
+ addRefsFromLoaded db targetPath (RealFile $ fromNormalizedFilePath srcPath) hash hf'
551
553
post
552
554
where
553
555
mod_location = ms_location mod_summary
You can’t perform that action at this time.
0 commit comments