Skip to content

Conversation

@lionel-
Copy link
Contributor

@lionel- lionel- commented Nov 14, 2024

Follow-up to #617
Addresses posit-dev/positron#5321

This will still cause weirdness as duplicate LSP sessions will keep using that global channel to communicate log messages and diagnostics, and these will end up being published by the newer LSP session.

To fix this we could take this opportunity to move from tower-lsp to lsp-server. The former has been unmaintained for a while and has multiple issues that require workarounds. The latter would give us much more control over the LSP event loop and allow us to initiate a session shutdown from the server to prevent duplicate LSP sessions.

@lionel- lionel- requested a review from jmcphers November 14, 2024 11:25
Copy link
Contributor

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

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

LGTM, and fixed the crash in my testing. With my own local changes to fix reconnect on workbench, this crash becomes 100% reproducible, so I'm going to merge this around and bump versions so we can consider it for Workbench. Thanks so much for jumping on this!

@jmcphers jmcphers merged commit b5edde4 into main Nov 14, 2024
6 checks passed
@jmcphers jmcphers deleted the bugfix/lsp-duplicate branch November 14, 2024 20:05
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants