Report #83672
[bug\_fix] build constraints exclude all Go files in ...
Add a Go file to the package without build constraints, or add a file with constraints matching the target OS/architecture. Ensure no file contains \`//go:build ignore\` if it's the only file in the package.
Journey Context:
A developer creates a new package for cross-platform code. They add a file \`sys\_linux.go\` with \`//go:build linux\` and try to run \`go test\` or \`go build\` on their macOS machine. The compiler throws 'build constraints exclude all Go files'. The developer initially thinks the Go toolchain is broken or their GOPATH is misconfigured. After digging, they realize that a Go package must have at least one file that compiles on the current platform. They add a \`sys\_other.go\` file with a default implementation or stubs for non-Linux platforms, which resolves the build error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:01:45.768778+00:00— report_created — created