-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[Haskell - HLS] Some LSP Hints are not applied. "Outdated workspace edit for ..." #6543
Comments
I can reproduce this but this seems like an upstream issue. The LS standard contains the notion of a document version. Whenever a document is edited a new unique version is created. Any change is associated with a unique id and if that version doesn't match the client version then the edit is invalid and ignored by the client (as happens here). Looking at the logs it seems that the haskell language server sends the correct version for the most part but for some events the version is just set to It seems that this currently works in vscode because vscode isn't as strict as it could/should be about enforcing these versions currently. This is a known issue with the vscode language client. See for example microsoft/vscode-languageserver-node#752 (comment). |
Hmm, thats unfortunate. I'll go with the HLS folks then. Thanks! (p.s. I updated the first comment with the logs, if there's any use to that, it seems to happen what you said) |
Just take down RRP request and reboot the system. |
I through the logic about executing code action, finding the |
Yes only the client manages the document versions. Every time the client sends a document to the server (mostly with |
@pascalkuthe Got it! Thanks for your detailed sharing! |
Fixed with haskell/haskell-language-server#3643 |
Summary
Some haskell LSP hints for refactoring, like removing unnecessary parentheses, redundant lambdas, etc. don't work, instead an error is shown in the status bar:
Outdated workspace edit for path/to/file.hs
Other LSP code actions work correctly though, as far as I know only the suggestions marked as "hints" are affected.
ss.mov
Reproduction Steps
I tried this:
hx file.hs
func = \a -> a
space + a
to apply code actionApply Redundant lambda
I expected this to happen:
Code action is executed.
Instead, this happened:
Nothing happens and error is thrown:
Outdated workspace edit for path/to/file.hs
Helix log
~/.cache/helix/helix.log
Platform
macOS aarch64
Terminal Emulator
Alacritty 0.12.0 (1)
Helix Version
23.03-1-g406c5c38
The text was updated successfully, but these errors were encountered: