x/tools/gopls: support multiple sets of GOOS/GOARCH/build tags #42028
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
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (this is a feature request, not a bug report)
What operating system and processor architecture are you using (
go env
)?go env
OutputExplanation
My program has multiple implementations of certain functions, separated by build tags. For example, a function might have implementations for
js && wasm && !headless
,(!js || !wasm) && !headless
, andheadless
.Right now, I need to define GOOS, GOARCH, and a set of build tags for the entire project, which results in files that don't match those tags giving this message:
Additionally, linter errors (and possibly also compiler errors?) are not reported for files that don't match the project-wide build tags.
It would be nice to be able to define multiple build contexts for live error reporting and have the "no packages found" error be ignored if any of the build contexts included the file.
The text was updated successfully, but these errors were encountered: