x/tools/gopls: does not conform to Go documentation on non-scalar GOPATH #36120
Labels
Milestone
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. |
The |
Change https://golang.org/cl/211304 mentions this issue: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I am currently one patch level behind. But based on the source code on current master shown below, I believe it will reproduce with the latest release.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
VSCode installed
gopls
for me, and it shows an error message when I get to a go file that is (i) in myGOPATH
but (ii) imports an unsatisfied dependency. For example, try:The error message is:
I believe this is because my
GOPATH
is a colon-separated string:This type of non-scalar
GOPATH
s is supported in Go 1 according to the current Go documentation https://golang.org/cmd/go/#hdr-GOPATH_environment_variable:However, this line of code at current master does not appear to support such non-scalar
GOPATH
s. https://github.com/golang/tools/blob/0f69de236bb709847e215a792a40aaee1cba60d9/internal/lsp/source/errors.go#L50:What did you expect to see?
I expect
gopls
to supportGOPATH
s allowed by the Go documentation and therefore not return the error message shown above.What did you see instead?
I saw the error message shown above.
The text was updated successfully, but these errors were encountered: