Skip to content

Commit ea468c2

Browse files
committed
fix build in plugins
1 parent 3441fae commit ea468c2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

plugins/hls-retrie-plugin/hls-retrie-plugin.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ library
3030
, lsp-types
3131
, retrie >=0.1.1.0
3232
, safe-exceptions
33+
, stm
3334
, text
3435
, transformers
3536
, unordered-containers

plugins/hls-retrie-plugin/src/Ide/Plugin/Retrie.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
module Ide.Plugin.Retrie (descriptor) where
1818

1919
import Control.Concurrent.Extra (readVar)
20+
import Control.Concurrent.STM (readTVarIO)
2021
import Control.Exception.Safe (Exception (..),
2122
SomeException, catch,
2223
throwIO, try)
@@ -356,7 +357,7 @@ callRetrie ::
356357
Bool ->
357358
IO ([CallRetrieError], WorkspaceEdit)
358359
callRetrie state session rewrites origin restrictToOriginatingFile = do
359-
knownFiles <- toKnownFiles . unhashed <$> readIORef (knownTargetsVar $ shakeExtras state)
360+
knownFiles <- toKnownFiles . unhashed <$> readTVarIO (knownTargetsVar $ shakeExtras state)
360361
let reuseParsedModule f = do
361362
pm <-
362363
useOrFail "GetParsedModule" NoParse GetParsedModule f

0 commit comments

Comments
 (0)