File tree 1 file changed +4
-5
lines changed
plugins/hls-cabal-plugin/src/Ide/Plugin
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ import qualified Language.LSP.Types as LSP
40
40
import qualified Language.LSP.VFS as VFS
41
41
42
42
data Log
43
- = LogModificationTime NormalizedFilePath ( Maybe FileVersion )
43
+ = LogModificationTime NormalizedFilePath FileVersion
44
44
| LogShake Shake. Log
45
45
| LogDocOpened Uri
46
46
| LogDocModified Uri
@@ -138,11 +138,10 @@ cabalRules recorder = do
138
138
define (cmapWithPrio LogShake recorder) $ \ ParseCabal file -> do
139
139
-- whenever this key is marked as dirty (e.g., when a user writes stuff to it),
140
140
-- we rerun this rule because this rule *depends* on GetModificationTime.
141
- t <- use GetModificationTime file
141
+ (t, mCabalSource) <- use_ GetFileContents file
142
142
log' Debug $ LogModificationTime file t
143
- mVirtualFile <- Shake. getVirtualFile file
144
- contents <- case mVirtualFile of
145
- Just vfile -> pure $ Encoding. encodeUtf8 $ VFS. virtualFileText vfile
143
+ contents <- case mCabalSource of
144
+ Just sources -> pure $ Encoding. encodeUtf8 sources
146
145
Nothing -> do
147
146
liftIO $ BS. readFile $ fromNormalizedFilePath file
148
147
You can’t perform that action at this time.
0 commit comments