Skip to content
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: RPC logging is incorrect #33755

Closed
pjweinb opened this issue Aug 21, 2019 · 2 comments

Comments

@pjweinb
Copy link
Contributor

commented Aug 21, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12.5 linux/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
linux
The first two records output are out of order. [Trace - 10:04:01 AM] Received response 'initialize - (0)' in 0ms. is the response to the initialize request, and the second log record [Trace - 10:04:01 AM] Sending notification 'initialize' in 85ms. is not a notification, but (from looking at the content) the initialization request.

Then the next two log entries are doubly out of order:
[Trace - 10:04:01 AM] Sending response 'client/registerCapability - (1)' in 0ms.
Params: {}

[Trace - 10:04:01 AM] Received notification 'client/registerCapability' in 2ms.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]}

as they actually happened (on the wire) after the client notified the server that it was initialized.
[as shown by added code in headerStream.Read/headerStream.Write that dumps data just as it is read or written.

@gopherbot gopherbot added this to the Unreleased milestone Aug 21, 2019

@gopherbot gopherbot added the gopls label Aug 21, 2019

@gopherbot

This comment has been minimized.

Copy link

commented Aug 21, 2019

Thank you for filing a gopls issue! Please take a look at the Troubleshooting section of the gopls Wiki page, and make sure that you have provided all of the relevant information here.

@gopherbot

This comment has been minimized.

Copy link

commented Aug 27, 2019

Change https://golang.org/cl/191963 mentions this issue: x/tools/gopls: reimplement rpc logging at a lower level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.