-
Notifications
You must be signed in to change notification settings - Fork 130
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
Avoid strict unmarshaling of responses #118
Comments
This was resolved as part of creachadair/jrpc2#32 - unknown fields are now ignored by default, which is also the default behaviour of the native Go JSON decoder, we can upgrade to the latest version. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Current Version
Context
As mentioned in #117
go-lsp
currently provides us structs which represent requests/responses, but regardless of what library we use, it will inevitably be behind at some point.Even if the library stays on top of spec changes, there's the long tail of:
a) language servers actually updating in time, and
b) end-users of these LS updating in time
Generally the problem is that clients will move at a different pace to servers and neither side has any way of controlling that pace, because the protocol doesn't do any version negotiation.
Attempted Solutions
The upstream jrpc2 library implements strict JSON unmarshaling, which motivated sourcegraph/go-lsp#8 to implement "loose" unmarshaling, which came with a flaw related to unmarshalers in embedded structs.
Proposal
Turn off the strict mode in jrpc2. This will require reopening creachadair/jrpc2#5 in some form or shape.
The text was updated successfully, but these errors were encountered: