Skip to content

x/tools/gopls: trace of error response is missing #42157

Open
@hyangah

Description

@hyangah

I triggered a codeAction that will fail and couldn't find the matching "Received response ..." from gopls trace.
The 'Error' entry is from vscode client (in response of the error reply) and doesn't include the message id. This makes it difficult for trace viewer to process the trace.

[Trace - 18:36:44.832 PM] Sending request 'textDocument/codeAction - (8)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/hello/b.go"},"range":{"start":{"line":0,"character":1},"end":{"line":0,"character":1}},"context":{"diagnostics":[]}}

...
[Error - 6:36:44 PM] Request textDocument/codeAction failed.
  Message: no packages returned: packages.Load error
  Code: 0 

The following is the corresponding trace recorded from the client side.

[Trace - 6:36:44 PM] Sending request 'textDocument/codeAction - (8)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/hakim/hello/b.go"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 1
        },
        "end": {
            "line": 0,
            "character": 1
        }
    },
    "context": {
        "diagnostics": []
    }
}
...
[Trace - 6:36:44 PM] Received response 'textDocument/codeAction - (8)' in 39ms. Request failed: no packages returned: packages.Load error (0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions