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

Restart language server on command #2238

Merged
merged 1 commit into from
Mar 24, 2023
Merged

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Mar 24, 2023

Ensure that the language server is restarted when the "Restart Query Server" command is invoked.

This PR fixes the first part of #2199 where there are spurious red squiggles when upgrading to a new CLI version.

Replace this with a description of the changes your pull request makes.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@aeisenberg aeisenberg requested a review from a team as a code owner March 24, 2023 17:18
Ensure that the language server is restarted when the "Restart
Query Server" command is invoked.
@aeisenberg aeisenberg force-pushed the aeisenberg/restart-lang-server branch from 1c06ef9 to 2e0023f Compare March 24, 2023 17:22
@nickrolfe
Copy link
Contributor

Curious, I thought this was already done in #1487.

@adityasharad
Copy link
Contributor

I think that older PR covered the CLI server, but not the language server!

@aeisenberg
Copy link
Contributor Author

That's right. Previous PR was CLI server only. In general, it's harder to find noticeable errors when a new CLI version is used and the language server isn't restarted. That said, I'm surprised it took so long before we had an issue raised for this.

await queryRunner.restartQueryServer(progress, token);
await Promise.all([
queryRunner.restartQueryServer(progress, token),
ideServer.restart(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right.

Copy link
Contributor

@angelapwen angelapwen left a comment

Choose a reason for hiding this comment

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

🚢

@aeisenberg aeisenberg merged commit 23f783b into main Mar 24, 2023
@aeisenberg aeisenberg deleted the aeisenberg/restart-lang-server branch March 24, 2023 22:56
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.

4 participants