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: no diagnostics for invalid package name #39763
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
Thanks for the report. I am able to reproduce this, and we'll look into it. |
Looks like this is another case that could be handled by #39986. I'll add a work-around in the meantime. |
Change https://golang.org/cl/243579 mentions this issue: |
Change https://golang.org/cl/244028 mentions this issue: |
In the case of an invalid package name (the package name is a keyword), `go list` doesn't report any filenames associated with the package. As we have done previously, we can parse these out of the error message. However, it seems like, in this case, the filename is in the error string itself, not the error position. Updates golang/go#39986 Updates golang/go#39763 Change-Id: Id9c68a93ac4f545e4e2152540ca85b92f1df4640 Reviewed-on: https://go-review.googlesource.com/c/tools/+/244028 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yup
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/f3j9wyeeVMO
What did you expect to see?
An error or something. I first noticed
gofmt
stopped working when I hit save, so I restarted the Go server and tried again. No luck. Eventually I figured out that maybe default was a reserved keyword in Go.What did you see instead?
No indication of error, just
gofmt
not working.The text was updated successfully, but these errors were encountered: