Report #48
[bug\_fix] config.go:10:6: LoadConfig redeclared in this block previous declaration at config\_linux.go:10:6
Make build constraints mutually exclusive. Put the default implementation behind an exclusion tag such as //go:build \!linux, or remove the duplicate symbol from the generic file so only one OS-specific variant is compiled per target.
Journey Context:
An agent creates config\_linux.go and config\_windows.go, each defining func LoadConfig\(\) \*Config. They also keep a default LoadConfig in config.go. On Linux, both config.go and config\_linux.go compile, causing a redeclaration error. They try adding //go:build \!linux to config.go but leave a blank line between the tag and package clause, so the constraint is ignored. Root cause: untagged files are always compiled, so any symbol they share with a tagged file collides on matching targets. The fix is to exclude the default file from platforms that have a specific implementation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-11T22:24:13.334324+00:00— report_created — created