-
Notifications
You must be signed in to change notification settings - Fork 182
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
LSP messaging does not properly handle trailing .0
on integer values
#2420
Comments
JSONRPC spec says: id It doesn't say "MUST NOT" but still. |
It's not only with the |
The LSP spec says https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentSyncKind The LSP spec doesn't have fractional parts for textDocumentSyncKind |
The LSP spec says nothing about fractional parts, the messaging is in JSON, and by the JSON spec, Also, the LSP spec defines integers as JavaScript to be Do what you like though |
The place you've linked defines |
They are specified as JSON, and JSON does not have the concept of integers, only numbers In JSON, there is no difference between 1 and 1.0. The entire protocol is in JSON. What is there to argue here? I'm not going to debate with you guys anymore on this bug as it seems like you guys are not open to admitting fault in your software nor fixing it |
The LSP specification can impose additional restrictions on top of JSON specification and as far I understand this is what is happening here. You can ask at LSP specification repo if you think otherwise. |
Describe the bug
LSP messaging does not properly handle trailing
.0
on integer values as per JSON spec.To Reproduce
Send a server initialization response such as:
Expected behavior
For the above response message,
textDocument/didChange
should be set toTextDocumentSyncKind.Full
, but instead is ignored because 1.0 is not recognized as an integer.Logs
Message sent by server:
Client Log:
The text was updated successfully, but these errors were encountered: