Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Upgrade to haskell-lsp 0.19 #254

Merged
merged 2 commits into from
Dec 16, 2019
Merged

Upgrade to haskell-lsp 0.19 #254

merged 2 commits into from
Dec 16, 2019

Conversation

cocreature
Copy link
Collaborator

@cocreature cocreature commented Dec 15, 2019

No description provided.

@@ -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
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@cocreature cocreature merged commit 8ea5d69 into master Dec 16, 2019
@cocreature cocreature deleted the haskell-lsp-0.19 branch December 16, 2019 13:57
@pepeiborra
Copy link
Collaborator

pepeiborra commented Dec 31, 2019

I've noticed a hover performance degradation in head, and bisected it to this change. Hover takes twice as long for me.

Profiling a hover operation gives the following results.

before
image

after
image

@pepeiborra pepeiborra mentioned this pull request Dec 31, 2019
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Upgrade to haskell-lsp 0.19

* Clarify version handling
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Upgrade to haskell-lsp 0.19

* Clarify version handling
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Upgrade to haskell-lsp 0.19

* Clarify version handling
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants