fix: workspace/executeCommand with async handlers#535
Merged
Conversation
When wrapping an async handler with the language server instance, set the `func` attribute on the resulting handler. This allows the code that processes the result of `functools.partial()` to be reused.
7cc3604 to
c6d4cf3
Compare
tombh
approved these changes
May 28, 2025
Collaborator
|
Was the Windows build just flaking? |
Collaborator
Author
|
Thanks!
Yes... not sure what was going on there, the test suite got stuck for some reason and the job timed out. Something to keep an eye on I guess. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description (e.g. "Related to ...", etc.)
Turns out I forgot to handle async command handlers when implementing #527!
When wrapping an async handler with the language server instance, set the
funcattribute on the resulting handler. This allows the code that processes the result offunctools.partial()to be reused. This ensures theworkspace/executeCommandcode can obtain the correct function signature to map values onto.Code review checklist (for code reviewer to complete)
Automated linters
You can run the lints that are run on CI locally with: