Report #80648
[bug\_fix] build constraints exclude all Go files in /app/internal/platform
Add a default implementation file with the inverse build constraint \(e.g., \`//go:build \!linux\`\) or a file without constraints, so the package is valid on all target platforms.
Journey Context:
A developer is building a CLI tool and splits OS-specific code into \`sys\_linux.go\` and \`sys\_darwin.go\`. When they run \`GOOS=windows go build\`, the compilation fails with 'build constraints exclude all Go files'. They panic thinking their code is broken, but realize Go requires every package to have at least one valid \`.go\` file for the target environment, even if the resulting binary doesn't use that package directly on that OS. They add \`sys\_other.go\` with \`//go:build \!linux && \!darwin\` containing stub implementations, satisfying the compiler.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:58:03.660588+00:00— report_created — created