You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have a go file that call wire.Build, we put a build constraint to the start of the file. The gopls will prompt the following message saying that no packages found.
No packages found for open file /some/path/wire.go: <nil>.
If this file contains build tags, try adding "-tags=<build tag>" to your gopls "buildFlag" configuration (see (https://github.com/golang/tools/blob/master/gopls/doc/settings.md#buildflags-string).
Otherwise, see the troubleshooting guidelines for help investigating (https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md).
If we remove the empty line between the build constraint and the package, it behave like the issue described here #117
Describe the bug
If we have a go file that call
wire.Build, we put a build constraint to the start of the file. Thegoplswill prompt the following message saying that no packages found.If we remove the empty line between the build constraint and the
package, it behave like the issue described here #117To Reproduce
Expected behavior
No warnings.
Version
Additional context
My vscode settings
{ "go.lintOnSave": "workspace", "go.lintTool": "golangci-lint", "go.useLanguageServer": true, "go.formatTool": "goimports", "[go]": { "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.organizeImports": true }, "editor.snippetSuggestions": "none" }, "[go.mod]": { "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.organizeImports": true } }, "gopls": { "usePlaceholders": true, "staticcheck": false }, }