Skip to content

Commit c6adf6a

Browse files
Shan AliShan Ali
authored andcommitted
deubg: log when file not in cache
1 parent 1a30a51 commit c6adf6a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/StaticLS/IDE/Monad.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import Data.Text (Text)
2323
import Data.Text qualified as T
2424
import Data.Text.IO qualified as T
2525
import Data.Time
26+
import Debug.Trace
2627
import StaticLS.FilePath
2728
import StaticLS.HIE.File qualified as HIE.File
2829
import StaticLS.HieView qualified as HieView
@@ -126,9 +127,9 @@ getFileStateResult path = do
126127
if doesExist
127128
then do
128129
contents <-
129-
liftIO $
130-
Exception.tryAny
131-
(liftIO $ T.readFile $ toFilePath path)
130+
trace ("Reading from disk (not in cache): " ++ show path) $
131+
liftIO $
132+
Exception.tryAny (liftIO $ T.readFile $ toFilePath path)
132133
case contents of
133134
Left e -> do
134135
logError $ "Failed to read file: " <> T.pack (show e)

0 commit comments

Comments
 (0)