Skip to content

Fixes to persistVirtualFile #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 13, 2019

Conversation

mpickering
Copy link
Contributor

  1. Make it return a Maybe when the file does not exist in the VFS
  2. Use an monotonically incrementing counter to keep track of the version rather than relying on the LSP version which has no guarantees about monotonicity.

@mpickering mpickering force-pushed the wip/persist-virtual-file branch from e596aac to d911fe3 Compare November 26, 2019 23:14
@@ -17,6 +17,9 @@ module Language.Haskell.LSP.VFS
(
VFS(..)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we hide the fields of the VFS record?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My opinion is no, it would be very annoying for someone if they had to add a missing function themselves.

mpickering and others added 4 commits December 10, 2019 22:06
The old version field corresponds to an LSP notion of versioning which
resets of saves. The new version field increases monotonically and is
used to seed the temporary file names.
@fendor fendor force-pushed the wip/persist-virtual-file branch from 2d99c75 to b4ffb64 Compare December 10, 2019 21:25
@fendor fendor requested review from alanz and lukel97 December 13, 2019 14:49
@alanz alanz merged commit 1c62b4a into haskell:master Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants