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, and headless.
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:
Thank you for filing this issue. Definitely agree that we need to improve the UX for working with build tags--that is covered by #29202. When we work on it, we will definitely consider your use case. If it's ok with you, I'm going to close this issue as a duplicate.
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: