x/tools/gopls: misleading error message when having multiple workspace folders and using build tag #60776
Labels
gopls/metadata
Issues related to metadata loading in gopls
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
gopls version
v0.12.2 (or v0.12.1)
go env
go env
gopls stats
What did you do?
Then, from the VS Code window open with the setting, open
buildtag.go
which has//go:build
tag.What did you expect to see?
Usual build-tag related error message on the
package
lineWhat did you see instead?
"This file is within module ".", which is not included in your workspace.
To fix this problem, you can add a go.work file that uses this directory.
See the documentation for more information on setting up your workspace:
https://github.com/golang/tools/blob/master/gopls/doc/workspace.md.go list"
The text was updated successfully, but these errors were encountered: