Skip to content

x/tools/gopls: invalid link in codeaction description #44360

Closed
@hyangah

Description

@hyangah

gopls version: 0.6.6-pre.1
go version: 1.16

While there is still "Error Loading workspace" error is active because I opened a directory that contains multiple go modules,
I found the links included in the diagnostics message for import statements contain invalid links.

Screen Shot 2021-02-17 at 10 05 31 PM

Screen Shot 2021-02-17 at 10 05 44 PM

gopls trace shows the uri scheme is file://

[Trace - 22:10:41.002 PM] Sending request 'textDocument/codeAction - (33)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/misc-builder/cmd/cli/findwork.go"},"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":32}},"context":{"diagnostics":[{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":32}},"message":"could not import github.com/google/subcommands (cannot find package \"github.com/google/subcommands\" in any of \n\t/usr/local/go/src/github.com/google/subcommands (from $GOROOT)\n\t/Users/hakim/go/src/github.com/google/subcommands (from $GOPATH))","code":"BrokenImport","codeDescription":{"href":"file:///pkg.go.dev/golang.org/x/tools/internal/typesinternal#BrokenImport"},"severity":1,"source":"compiler"}],"only":["quickfix"]}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeToolsThis 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

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions