Conversation
|
This is a breaking change for clients. Is this really necessary? |
|
Hang on isn't this a breaking change? |
I'm just trying to update the documentation to reflect the current state of the protocol. |
|
I always thought that the documentation is the protocol. In other words, the source of truth would be what is written on the website labeled as "Specification" under https://microsoft.github.io/language-server-protocol/specifications/specification-current, and not some implementation detail in a vscode-languageserver-node library. That said, in the client implementation for Sublime Text we already have a workaround for exactly this use case (more precisely one part of the proposed changes), because apparently there is already a language server that violates the current specs for this return type. Of course I don't know how other clients handle it, or whether they would crash if |
I 200% agree with you here. However from my contribution experience in this repository I know that changes will often be made first to the VS Code LSP implementation and then the metamodel will be generated there and ported to this repo (see how these generator scripts are defined there). I don't like this order of operations, but I want to make sure that when the metamodel is updated in the future the documentation reflects what the types do so that other editors can align. |
The documentation, is the protocol. |
Please read #2235 (comment). I'm on your side here. |
|
The specification is the truth. The reason why I actually would like to change the specification here is consistency. The fact that the two requests don't allow to return So I somehow assume that most clients will handle |
|
I for one explicitly check the spec every time to see if a value can be null. Because that requires extra code vs say an empty list. As it happens I don't think this particular item is supported by my client so it's not such a big deal for me, but in general it's true. |
They don't. I'd also think that if there is a |
|
As said it is more about consistency. The protocol started to allow |
Is this documented in the specification? These types are defined using TypeScript syntax though, and in TypeScript an empty array is different from |
After microsoft/vscode-languageserver-node#1691 these methods are typed as potentially returning
null. Updating the documentation to reflect this.