-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/tools/gopls: JSON-RPC spec violation #39719
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
I am confused, because gopls does not use net/rpc/jsonrpc, it uses x/tools/internal/jsonrpc2 where the wire structs do have omitempty on them, and I cannot reproduce it with a simple test. |
Ah yes, I thought it might be using that internal tools package. I made a quick example of how to reproduce this behaviour. |
I assume the fix is to check if |
Change https://golang.org/cl/239097 mentions this issue: |
Off-topic, but I wonder if it might be a good idea not to marshal the |
Probably, especially as we never fill it in. |
Created a new issue #39736 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm using
gopls
, along withsublimelsp
. There was an issue where a single JSON-RPC error response will persist for the duration of the session. During this, it was discovered thatgopls
violates the JSON-RPC spec by sending aresult
in an error response.I have a feeling this is actually a
net/rpc/jsonrpc
issue, as it's missing,omitempty
.What did you expect to see?
The response to not contain a
result
in an error response.What did you see instead?
gopls
Editor
Sublime Text Dev Channel, Build 4074
See the original issue for more information.
cc @rchl @rwols
The text was updated successfully, but these errors were encountered: