Commit activity
Last 12 weeks · 0 commits
Community health
2 of 6 standards met
Recent PRs & issues
Summary recognize the LSP request before application request dispatch use to return a successful response and wait for avoid logging after the stdio transport has closed replace the empty server test with a regression test for the complete shutdown handshake Root cause The server previously treated as an unsupported application request. Once the client closed its stdio pipes, emitted a final warning. A failed stderr write caused to panic recursively and Rust aborted the process with . Verification (16 passed) end-to-end stdio smoke test: initialize, receive a successful shutdown response, close the stderr reader, send , and observe exit status 0 Closes #70
Summary can abort with while an editor is shutting down. The server does not handle the LSP request, and after the stdio transport closes it emits a final log message to stderr. If the client has already closed the stderr pipe, recursively panics while trying to report the write failure, so Rust aborts the process. I observed this three times with Neovim; every crash immediately followed the same unhandled request. Version Installed package: from crates.io via Mason Current is also affected: it still routes through and logs after . Linux x86-64 Expected behavior The server responds successfully to , waits for the notification, and exits without a core dump. Actual behavior The final server log is: then records . Relevant frames: This is a panic while reporting a logging failure, followed by another panic in the logger's panic hook. Reproduction A broken stderr pipe reproduces the same with the released binary: In the editor case, the trigger is the shutdown sequence: 1. Neovim sends . 2. treats it as an ordinary unsupported request. 3. Neovim closes the transport while exiting. 4. completes. 5. calls against the closed stderr pipe. 6. recursively panics and aborts. Proposed fix Use before dispatching application requests. That helper sends the required successful shutdown response and waits for the notification. Also avoid logging after the stdio threads have joined, because the client owns and may already have closed stderr.
Recent fixes
Repository: ThePrimeagen/htmx-lsp. Description: its so over Stars: 708, Forks: 33. Primary language: Rust. Languages: Rust (97.5%), JavaScript (2%), Lua (0.4%), HTML (0.1%). License: MIT. Latest release: 0.2.0 (1y ago). Open PRs: 3, open issues: 8. Last activity: 1y ago. Community health: 42%. Top contributors: ThePrimeagen, MNThomson, itepastra, cristianoliveira, praveenperera, WillLillis, vihu, lavafroth, Hexa3333, BlueBlizzardd and others.