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: call language client stop during deactivation #5217

Merged
merged 7 commits into from
Nov 9, 2023

Conversation

peternhale
Copy link
Contributor

This PR fixes the issue of language servers being orphaned.

This change adds a call to the language client stop function during the apex extension deactivate call.

@W-14446753@

@peternhale peternhale requested a review from a team as a code owner November 7, 2023 19:46
@@ -284,6 +284,7 @@ async function registerTestView(): Promise<vscode.Disposable> {
}

export async function deactivate() {
await languageClient?.stop();
Copy link
Contributor

Choose a reason for hiding this comment

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

sweet. We already have a unit test suite for this class. Mind adding a unit test for the deactivate function? I'll QE in the mean time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

Copy link
Contributor

@gbockus-sf gbockus-sf left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!
QE passed.

Test Cases

  • Verify when run via a vsix the Apex LSP exits when VSCode is shut down via the X ✅
  • Verify when run via a vsix the Apex LSP exits when VSCode is shut down via quit Visual Studio Code ✅
  • Verify when run via a vsix the Apex LSP exits when VSCode is shut down when running in dev mode ✅

Copy link
Contributor

@gbockus-sf gbockus-sf left a comment

Choose a reason for hiding this comment

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

one q about the test. Good to go.

Copy link
Contributor

@gbockus-sf gbockus-sf left a comment

Choose a reason for hiding this comment

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

🚢

@peternhale peternhale merged commit bdb7970 into develop Nov 9, 2023
12 of 13 checks passed
@peternhale peternhale deleted the phale/W-14446753-call-stop branch November 9, 2023 22:17
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.

None yet

2 participants