Improve lifecycle management of LSP
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 337
- Forks
- 32
- Avg merge
- 8d 17h
- Merged PRs (30d)
- 11
Description
@lionel- and I were looking at the LSP lifecycle a little more and realized that when the tower-lsp server exits here:
we should also unset the events channel in RMain that we sent it here:
because there is no longer anything it can send messages to.
The tower-lsp server will exit like this during a Positron developer refresh, so it is a decently common case. I think it is possible for us to get in a bad place if we don't clear the RMain sender.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in crates/ark/src/lsp/backend.rs at the server setup around lines 397-403 and exit handling around line 427. Trace how the events channel is stored in RMain and how the tower-lsp server exits during a developer refresh. Done means the RMain channel is cleared when the server exits, with the existing lifecycle behavior preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100