Preserve types for backwards compatibility.#174
Merged
Conversation
sandy081
approved these changes
Mar 3, 2023
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.
This was the old definition (params was composed of two things) the combined type was aliased as
WorkspaceConfigurationParams:{ "method": "workspace/configuration", "result": { "kind": "array", "element": { "kind": "reference", "name": "LSPAny" } }, "messageDirection": "serverToClient", "params": { "kind": "and", "items": [ { "kind": "reference", "name": "ConfigurationParams" }, { "kind": "reference", "name": "PartialResultParams" } ] }, "documentation": "The 'workspace/configuration' request is sent from the server to the client to fetch a certain\nconfiguration setting.\n\nThis pull model replaces the old push model were the client signaled configuration change via an\nevent. If the server still needs to react to configuration changes (since the server caches the\nresult of `workspace/configuration` requests) the server should register for an empty configuration\nchange event and empty the cache if such an event is received." }This is the new definition:
{ "method": "workspace/configuration", "result": { "kind": "array", "element": { "kind": "reference", "name": "LSPAny" } }, "messageDirection": "serverToClient", "params": { "kind": "reference", "name": "ConfigurationParams" }, "documentation": "The 'workspace/configuration' request is sent from the server to the client to fetch a certain\nconfiguration setting.\n\nThis pull model replaces the old push model were the client signaled configuration change via an\nevent. If the server still needs to react to configuration changes (since the server caches the\nresult of `workspace/configuration` requests) the server should register for an empty configuration\nchange event and empty the cache if such an event is received." }I will preserve the aliasing in lsprotocol in cases like this.
Issue reference:
sublimelsp/LSP-ruff#8
openlawlibrary/pygls#317