-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Clojure crashing the editor #3389
Comments
I tried poking around in a clojure project for a while but I couldn't reproduce this with the
The panic comes from the handling of LSP PublishDiagnostics here: helix/helix-term/src/application.rs Line 513 in 80dde57
which looks like it can be Can you reproduce this running in verbose mode ( |
|
retrying without
which is the only line logged before crashing |
Ah, these two lines are interesting:
Looks like clojure-lsp is sending a textDocument/publishDiagnostics before the initializeResult which is invalid according to the LSP spec. If you have a reliable reproduction case you can share (they would probably want an example project that exhibits the behavior), it would be good to report this upstream to clojure-lsp. I haven't been able to reproduce oddly. That being said, we've been trying to be more defensive about spec violations: we should discard messages and not panic when the server breaks spec. I've opened a PR to log and discard the textDocument/publishDiagnostic if it's received before the language server is initialized: #3403. Could you give that a try and see if that prevents the panic? |
Today I cannot reproduce this bug, even though I changed nothing in my setup (unless there was a sneaky update?). |
Summary
The bug is really simple, the helix-lsp-client seems to crash when editing clojure code.
At first the editing works and at some point it crashes and from then on, it is impossible to re-open the file without the editor crashing.
Reproduction Steps
I'm in a default
lein
project.I tried this:
hx src/project/core.clj
I expected this to happen:
being able to use helix to edit clojure files
Instead, this happened:
after some time editing the file, the editor crashes. When trying to re-open the file, it crashes immediately.
Helix log
~/.cache/helix/helix.log
or sometimes
(
clojure-lsp
is in my path and it's found sometimes)on top of that, the instantaneous crash when I open the file doesn't produce any logs !
Rust stack trace
Here are the rust logs, since they were provided too:
Platform
Linux (NixOS)
Terminal Emulator
wezterm
Helix Version
helix 22.05 (d192d59)
The text was updated successfully, but these errors were encountered: