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

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

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

hyangah opened this issue Feb 18, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@hyangah
Copy link
Contributor

@hyangah 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 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

@stamblerre stamblerre commented Feb 18, 2021

@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

@gopherbot gopherbot commented Feb 18, 2021

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: v1.0.0 Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants