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: unknown revision error doesn't propagate to diagnostics #38232

Closed
stamblerre opened this issue Apr 3, 2020 · 2 comments
Closed
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

@stamblerre
Copy link
Contributor

stamblerre commented Apr 3, 2020

In conversation with @ardan-bkennedy, we noticed that adding a require github.com/pkg/errors v0.8.3 caused a diagnostic to get stuck because it was an unknown revision. Error messages should either get propagated, or we should clear diagnostics so they don't appear to be stuck?

@stamblerre stamblerre added this to the gopls/v0.4.0 milestone Apr 3, 2020
@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 Apr 3, 2020
@stamblerre stamblerre modified the milestones: gopls/v0.4.0, gopls/v0.5.0 Apr 3, 2020
@gopherbot
Copy link

Change https://golang.org/cl/242159 mentions this issue: internal/lsp: handle unknown revision in go.mod file

@gopherbot
Copy link

Change https://golang.org/cl/242477 mentions this issue: internal/lsp: try to parse diagnostics out of go list errors

@stamblerre stamblerre modified the milestones: gopls/v0.5.0, gopls/v0.4.4 Jul 21, 2020
gopherbot pushed a commit to golang/tools that referenced this issue Jul 21, 2020
This change attempts to parse diagnostics out of `go list` error
messages so that we can present them in a better way to the user. This
approach is definitely tailored to the unknown revision error described
in golang/go#38232, but we can modify it to handle other cases as well.

Fixes golang/go#38232

Change-Id: I0b0a8c39a189a127dc36894a25614535c804a3f0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/242477
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
@golang golang locked and limited conversation to collaborators Jul 21, 2021
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
None yet
Development

No branches or pull requests

2 participants