Report #3294
[bug\_fix] build constraints exclude all Go files in /path/to/package
Pass the matching build tag when building or testing: \`go test -tags=integration ./...\`. If the file should always be included, remove or correct the \`//go:build\` constraint. Remember that \`//go:build\` \(Go 1.17\+\) replaces the old \`// \+build\` syntax; mixing them inconsistently can confuse older tooling.
Journey Context:
You clone a repo, run \`go test ./...\`, and an entire package vanishes with 'build constraints exclude all Go files'. A file in that package starts with \`//go:build integration\`, so the compiler skips it unless you ask for the integration build. The package appears empty and the build fails. You inspect the file headers, realize the tag gates database-backed tests, and run with \`-tags=integration\`. The compiler now includes the constrained files, the tests compile, and you learn to treat build tags as an opt-in flavor rather than a bug.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T16:28:32.610814+00:00— report_created — created