Skip to content
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

fix: Fix restart server duplicating language clients #12847

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Jul 22, 2022

Reverts 03a62c1
vscode-languageclient@8.0.0-next.15 and beyond changed the behaviour of language clients to be automatically started if a request comes in while they are not running. Currently when we restart the server via the restart command we recreate the language client, which causes VSCode to restart the stopped server, effectively duplicating our language clients...

Reverting the commit is simpler right now, the proper fix would be to only create a language client once and then use the restart functionality on it instead.

Fixes #12836

@Veykril
Copy link
Member Author

Veykril commented Jul 22, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 22, 2022

📌 Commit f1b5e38 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jul 22, 2022

⌛ Testing commit f1b5e38 with merge 8272d2a...

@bors
Copy link
Collaborator

bors commented Jul 22, 2022

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 8272d2a to master...

@bors bors merged commit 8272d2a into rust-lang:master Jul 22, 2022
@Veykril Veykril deleted the vscode-downgrade branch July 22, 2022 22:28
bors added a commit that referenced this pull request Oct 17, 2022
Refactor language client handling

Follow up to #12847 (turns out they fixed parts of the problem)

The PR will attempt to allow us to dispose more resources at will, so that we can implement restarts for the server properly instead of restating the entire extension as well as allowing us to implement a stop command.

Closes #12936
Closes #4697
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inlay hints multiply when using VSCode action "Rust Analyzer: Restart server"
2 participants