x/tools/gopls: missing import error is broken on Windows #46805
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
While trying to help a user in slack, I noticed that gopls' error for missing imports is broken / misleading, particularly on Windows.
It assumes GOPATH mode (i.e. appending /src)So if GOPATH="C:\go", we get cannot find foo in any of ... C/src/foo, go/src/foo"
EDIT: we actually do have handling for module mode; the user had opened a non-module parent directory and so gopls assumed GOPATH mode.
The point about Windows still applies though.
The text was updated successfully, but these errors were encountered: