build: commands sharing a basename silently clobber each other #65

Open
opened 2026-05-22 00:17:13 +02:00 by heiko · 1 comment
Owner

Two build.commands entries that share a basename (e.g. cmd/foo and legacy/foo) both produce a binary called foo. They clobber each other in the output directory and — for explicit artifacts.packages configs — the binaries matching is basename-only, so it is impossible to route them to separate packages.

Discovered while fixing the packages[*].binaries full-path acceptance (PR upcoming). That fix normalises binary identifiers to basenames at load time, which makes the limitation visible as a correct double-claim validation error rather than a silent runtime failure.

The fix would require preserving the full Go package path through build.Result and updating all downstream consumers (binary matching, packaging, source package generation) to use a path-qualified identifier. This is a non-trivial refactor; tracking here for future work.

Two `build.commands` entries that share a basename (e.g. `cmd/foo` and `legacy/foo`) both produce a binary called `foo`. They clobber each other in the output directory and — for explicit `artifacts.packages` configs — the `binaries` matching is basename-only, so it is impossible to route them to separate packages. Discovered while fixing the `packages[*].binaries` full-path acceptance (PR upcoming). That fix normalises binary identifiers to basenames at load time, which makes the limitation visible as a correct double-claim validation error rather than a silent runtime failure. The fix would require preserving the full Go package path through `build.Result` and updating all downstream consumers (binary matching, packaging, source package generation) to use a path-qualified identifier. This is a non-trivial refactor; tracking here for future work.
Author
Owner

AI attribution comment added per repository instruction for this open issue.\n\n(co)authored by ai:gpt-5-codex

AI attribution comment added per repository instruction for this open issue.\n\n(co)authored by ai:gpt-5-codex
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
heiko/gogogo#65
No description provided.