← Back to issue list

go plugin: don't put debugging symbols in generated binaries

View original Github issue

Metadata

Project
snapcraft
Number
#777
Type
pull request
State
closed
Author
teknoraver
Labels
—
Created
Updated
Closed

Current evaluation

Rejected unmerged: Snapcraft already stripped Go binaries during prime, making build-time symbol suppression redundant.

Resolution: closed not a bug

Reason: The closing discussion established that Snapcraft already stripped binaries in prime while preserving symbols in stage. The author confirmed post-build stripping produced the same binary as Go's -ldflags='-s -w'.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Go binaries should never stripped or they can behave badly, but it's possible to avoid debugging symbol generation at build time. The binaries are roughly half the size

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Rejected unmerged: Snapcraft already stripped Go binaries during prime, making build-time symbol suppression redundant.
stealth/space-bunny-alpha — closed not a bug PR #777 was rejected: Snapcraft already strips Go binaries during prime builds, and the author confirmed post-build stripping produced the same binary as build-time -s -w flags.
qwen/qwen3.6-35b-a3b — — Rejected. Maintainers prefer stripping Go binaries in the prime step, not at build time. The author confirmed post-build stripping yields identical results, making the change redundant.
qwen3.6-35b-a3b-mtp-q6 — — Rejected as it conflicts with the strategy to strip binaries during the prime stage rather than at build time. Maintainers confirmed standard strip commands work on Go binaries, rendering the change unnecessary.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#733 (confidence 95%)

    The discussion linked the proposed build arguments to the previously merged go-buildtags schema work.

Related issues

Issue Project State Summary Similarity
#1858785 go plugin doesn't strip binaries snapcraft (launchpad) open The Go plugin still has no option to strip debug symbols from built binaries, leaving snap size reduction dependent on an override-build workaround.
80%
#2957 go plugin: do not remove install /bin directory before build snapcraft merged Merged PR #2957 (commit 1fee618c0) stopped the Go plugin from purging $SNAPCRAFT_PART_INSTALL/bin before build, preserving stage-package files; added a spread test for coverage.
72%