@@ -76,7 +76,8 @@ makeVFSHandle = do
76 modifyVar_ vfsVar $ \(nextVersion, vfs) -> pure $ (nextVersion + 1, ) $
76 modifyVar_ vfsVar $ \(nextVersion, vfs) -> pure $ (nextVersion + 1, ) $
77 case content of
77 case content of
78 Nothing -> Map.delete uri vfs
78 Nothing -> Map.delete uri vfs
79+ -- The second version number is only used in persistFileVFS which we do not use so we set it to 0.
79− Just content -> Map.insert uri (VirtualFile nextVersion (Rope.fromText content)) vfs
80+ Just content -> Map.insert uri (VirtualFile nextVersion 0 (Rope.fromText content)) vfs
82makeLSPVFSHandle :: LspFuncs c -> VFSHandle
83makeLSPVFSHandle :: LspFuncs c -> VFSHandle
@@ -139,7 +140,7 @@ getModificationTimeRule vfs =
139 alwaysRerun
140 alwaysRerun
140 mbVirtual <- liftIO $ getVirtualFile vfs $ filePathToUri' file
141 mbVirtual <- liftIO $ getVirtualFile vfs $ filePathToUri' file
141 case mbVirtual of
142 case mbVirtual of
142− Just (VirtualFile ver _) -> pure (Just $ BS.pack $ show ver, ([], Just $ VFSVersion ver))
143+ Just (virtualFileVersion -> ver) -> pure (Just $ BS.pack $ show ver, ([], Just $ VFSVersion ver))
143 Nothing -> liftIO $ fmap wrap (getModTime file')
144 Nothing -> liftIO $ fmap wrap (getModTime file')
144 `catch` \(e :: IOException) -> do
145 `catch` \(e :: IOException) -> do
145 let err | isDoesNotExistError e = "File does not exist: " ++ file'
146 let err | isDoesNotExistError e = "File does not exist: " ++ file'