File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
plugins/hls-call-hierarchy-plugin/src/Ide/Plugin/CallHierarchy Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ module Ide.Plugin.CallHierarchy.Internal (
12
12
, outgoingCalls
13
13
) where
14
14
15
- import Control.Concurrent
16
15
import Control.Lens ((^.) )
17
16
import Control.Monad.Extra
18
17
import Control.Monad.IO.Class
@@ -31,6 +30,7 @@ import Development.IDE.Core.Compile
31
30
import Development.IDE.Core.Shake
32
31
import Development.IDE.GHC.Compat as Compat
33
32
import Development.IDE.Spans.AtPoint
33
+ import GHC.Conc.Sync
34
34
import HieDb (Symbol (Symbol ))
35
35
import qualified Ide.Plugin.CallHierarchy.Query as Q
36
36
import Ide.Plugin.CallHierarchy.Types
@@ -318,7 +318,12 @@ refreshHieDb = do
318
318
liftIO $ writeAndIndexHieFile hsc se msum f exports asts source
319
319
pure ()
320
320
)
321
- liftIO $ threadDelay 100000 -- delay 0.1 sec to make more exact results.
321
+ ShakeExtras {hiedbWriter} <- getShakeExtras
322
+ liftIO $ atomically $ check $ indexPending hiedbWriter
323
+ where
324
+ check p = do
325
+ v <- readTVar p
326
+ if HM. null v then pure () else retry
322
327
323
328
-- Copy unexport function form `ghcide/src/Development/IDE/Core/Rules.hs`
324
329
getSourceFileSource :: NormalizedFilePath -> Action BS. ByteString
You can’t perform that action at this time.
0 commit comments