← Back to issue list

go plugin: filter the main packages go-packages are defined

View original Github issue

Metadata

Project
snapcraft
Number
#1355
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1355 as commit 3b4dc5628, updating the Go plugin to build only main packages when go-packages is unset because go build -o cannot use ./... across all packages.

Resolution: closed resolved

Reason: PR #1355 was merged as commit 3b4dc5628. It filters Go build targets to main packages, avoiding the incompatibility between go build -o and ./... when no packages are specified.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When no go packages are defined, `go build -o` is incompatible with `./...` so we need to provide it the main packages we want to build. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1355 as commit 3b4dc5628, updating the Go plugin to build only main packages when go-packages is unset because go build -o cannot use ./... across all packages.
stealth/space-bunny-alpha — closed resolved Merged PR #1355 in commit 3b4dc5628: the Go plugin filters build targets to main packages, avoiding go build -o incompatibility with ./... when Go packages are unspecified.
qwen/qwen3.6-35b-a3b — — Merged after approval. Filters main packages when go-packages are defined, resolving go build -o incompatibility with ./... when no packages are explicitly set. Fixes build failures in Go snaps lacking goimportpath.
qwen3.6-35b-a3b-mtp-q6 — — Merged a Go plugin fix to provide main packages when go-packages are defined. Resolves go build incompatibility with ./... when unspecified. Fixed build failures despite a reviewer requesting an integration test.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#709 Improve the go plugins usability snapcraft merged Merged as 57359d5d0: Go plugins now combine source keywords with go-packages, build selected main packages, and fetch missing dependencies via go get.
74%