-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
2bbbb75
to
bd4a196
Compare
@@ -76,7 +76,7 @@ makeVFSHandle = do | |||
modifyVar_ vfsVar $ \(nextVersion, vfs) -> pure $ (nextVersion + 1, ) $ | |||
case content of | |||
Nothing -> Map.delete uri vfs | |||
Just content -> Map.insert uri (VirtualFile nextVersion (Rope.fromText content)) vfs | |||
Just content -> Map.insert uri (VirtualFile nextVersion 0 (Rope.fromText content)) vfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this line is right. The first field is supposed to be a version number you get from the LSP request and the second number an auto-incrementing version. It seems you are not keeping track of the version number reported by haskell-lsp
at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaik the second number is only used for persistVirtualFile
which we don’t use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve checked the haskell-lsp
source again which seems to confirm this and I’ve added a comment to make it clear that we do not care about this field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note that this is the fake VFS handle that we use in some DAML tests that don’t use LSP, the proper VFS handle that you usually get is the one below in makeLSPVFSHandle
.
8007cd3
to
1f415ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
* Upgrade to haskell-lsp 0.19 * Clarify version handling
* Upgrade to haskell-lsp 0.19 * Clarify version handling
* Upgrade to haskell-lsp 0.19 * Clarify version handling
No description provided.