config: packages[*].binaries should accept full Go package paths #67

Closed
opened 2026-05-22 00:27:04 +02:00 by heiko · 0 comments
Owner

artifacts.packages[*].binaries in .gogogo.conf accepts only bare binary names
(e.g. cert-proxy-client), but users naturally mirror the path form used in
build.commands (e.g. cmd/cert-proxy-client). The current behaviour produces a
confusing doctor error and silently drops binaries from packages at runtime.

Fix: normalize packages[*].binaries entries to basenames at YAML unmarshal time
(PackagesSpec.UnmarshalYAML), so both forms are accepted transparently.

Also update knownBinary in internal/config/validation.go to use path.Base on
both sides, covering code paths that construct config.Package without going through
YAML (e.g. tests, future callers).

Related: the limitation that two build.commands sharing a basename clobber each
other is tracked separately in #65.

`artifacts.packages[*].binaries` in `.gogogo.conf` accepts only bare binary names (e.g. `cert-proxy-client`), but users naturally mirror the path form used in `build.commands` (e.g. `cmd/cert-proxy-client`). The current behaviour produces a confusing `doctor` error and silently drops binaries from packages at runtime. Fix: normalize `packages[*].binaries` entries to basenames at YAML unmarshal time (`PackagesSpec.UnmarshalYAML`), so both forms are accepted transparently. Also update `knownBinary` in `internal/config/validation.go` to use `path.Base` on both sides, covering code paths that construct `config.Package` without going through YAML (e.g. tests, future callers). Related: the limitation that two `build.commands` sharing a basename clobber each other is tracked separately in #65.
heiko closed this issue 2026-05-22 00:46:00 +02:00
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#67
No description provided.