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: invalid link in codeaction description #44360

Closed
hyangah opened this issue Feb 18, 2021 · 2 comments
Closed

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

hyangah opened this issue Feb 18, 2021 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Feb 18, 2021

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"]}}
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Feb 18, 2021
@gopherbot gopherbot added this to the Unreleased milestone Feb 18, 2021
@hyangah hyangah changed the title x/tools/gopls: invalid link in diagnostics message x/tools/gopls: invalid link in codeaction description Feb 18, 2021
@stamblerre
Copy link
Contributor

@findleyr: I guess we do need to add a scheme. Not sure why I didn't run into this issue.

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Feb 18, 2021
@findleyr findleyr self-assigned this Feb 18, 2021
@gopherbot
Copy link

Change https://golang.org/cl/293509 mentions this issue: internal/lsp/cache: add a scheme for types error code links

@stamblerre stamblerre added this to To Do in gopls on-deck Feb 28, 2021
gopls on-deck automation moved this from To Do to Done Apr 15, 2021
@golang golang locked and limited conversation to collaborators Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
No open projects
Development

No branches or pull requests

4 participants