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

Update vscode-languageclient to 8.0.2 #1327

Merged
merged 8 commits into from
Feb 14, 2023
Merged

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented Jan 24, 2023

The vscode-languageclient library introduced breaking API changes in the 8.X version that require changes to our extension to use:

  • Remove use of onReady() to wait for start of the LS and use start() instead
  • All features that implement StaticFeature need to use the updated interface

In addition to the above were interface changes to ErrorHandler. In applying these changes, it introduced duplicate error messages when loading the extension with incorrect settings. In effect, turning 1 or 2 messages into 3 or 4, depending on what was misconfigured. These cannot be customized: microsoft/vscode-languageserver-node#1011

This commit solves this by removing use of the ExtensionErrorHandler class and instead using inline methods for both initializationFailedHandler and errorHandler to detect failed extension errors. It avoids the duplicate methods by not using the ErrorAction message property and instead keeping track of whether or not an InitializeError was detected.

@jpogran jpogran self-assigned this Jan 24, 2023
The vscode-languageclient library introduced breaking API changes in the 8.X version that require changes to our extension to use:

- Remove use of onReady() to wait for start of the LS and use start() instead
- All features that implement StaticFeature need to use the updated interface

In addition to the above were interface changes to ErrorHandler. In applying these changes, it introduced duplicate error messages when loading the extension with incorrect settings. In effect, turning 1 or 2 messages into 3 or 4, depending on what was misconfigured. These cannot be customized: microsoft/vscode-languageserver-node#1011

This commit solves this by removing use of the ExtensionErrorHandler class and instead using inline methods for both initializationFailedHandler and errorHandler to detect failed extension errors. It avoids the duplicate methods by not using the ErrorAction message property and instead keeping track of whether or not an InitializeError was detected.
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

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

Nice work! Just a small cleanup suggestion within the static features.

src/features/moduleCalls.ts Outdated Show resolved Hide resolved
@jpogran jpogran marked this pull request as ready for review February 7, 2023 15:11
@jpogran jpogran requested a review from a team as a code owner February 7, 2023 15:11
@jpogran jpogran requested a review from dbanck February 7, 2023 15:56
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

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

There are a couple of unused imports in the static features. Do you mind removing those before merging?

Everything else LGTM 👍

@jpogran jpogran requested a review from dbanck February 10, 2023 13:20
Copy link
Member

@dbanck dbanck 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 improving the error messages

@jpogran jpogran merged commit f233708 into main Feb 14, 2023
@jpogran jpogran deleted the vscode-langclient-update branch February 14, 2023 16:01
@jpogran jpogran linked an issue Mar 2, 2023 that may be closed by this pull request
2 tasks
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2023
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.

Update vscode-languageclient to v8.0.2
2 participants