microsoft / vscode-languageserver-node

Language server protocol implementation for VSCode. This allows implementing language services in JS/TS running on node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using wrong name for method `client/registerFeature`: should be `client/registerCapability`

kdvolder opened this issue · comments

I guess if we use both the client and server implementations here we won't notice this as both are using the same wrong names.

However trying to make this interoperate with lsp4j's implementation which actually uses the correct names things break with error like these:

[pool-2-thread-1] ERROR org.springframework.ide.vscode.commons.util.Log - Error
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Unhandled method client/registerCapability

This seems to be the problem: https://github.com/Microsoft/vscode-languageserver-node/blob/143fb3928737db949bb800ba27d1c6580ad0c024/client/src/protocol.ts#L95

Also the name for unregisterFeature seems to be wrong as well.

I'm also running into this problem when trying to implement something against the spec... would be great if it were fixed.

Good catch. I changed the name when writing the spec but forgot to update the implementation. Will correct that.

@aeschli FYI. I will fix this as 3.2.1 and on the next 3.3.x release. I will push this as soon as 1.12 is out. If you update the node libararies make sure you update both client and server.

@dbaeumer Ok. Is the version just a patch number update (3.2.0 to 3.2.1)? I think we're fine as we use shrinkwrap on the server and client, but others might be impacted

It is a patch version number (3.2.0 -> 3.2.1). Agree that we shouldn't be impacted due to shrink wrap.

@aeschli added code to handle wrong requests sent from the server to the client on the client side. However if you have a never server with an older client this still causes problems.

Published 3.2.1.