docs: document build optimization flags in contributor guide#2103
docs: document build optimization flags in contributor guide#2103botantler[bot] merged 9 commits intomainfrom
Conversation
Add documentation for -ldflags="-s -w" build optimization that reduces binary size by ~28% (302MB → 217MB). This helps contributors understand the difference between development builds and release artifacts. Changes: - CONTRIBUTING.md: Add production build command with optimization flags - .github/copilot-instructions.md: Add optimization note to build section Relates to: #2095
✅
|
There was a problem hiding this comment.
Pull request overview
Documents Go release build optimization flags (-ldflags="-s -w") so contributors understand why local development builds can be larger than release artifacts, aligning contributor guidance with the existing GoReleaser/CI configuration introduced in #2095.
Changes:
- Add an optimized
go buildexample using-ldflags="-s -w"to CONTRIBUTING.md. - Add the same optimized build guidance to
.github/copilot-instructions.mdfor consistency. - Explain that stripping debug symbols reduces binary size (with an example measurement).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| CONTRIBUTING.md | Adds dev vs release/optimized build commands and an explanatory note about -ldflags="-s -w". |
| .github/copilot-instructions.md | Mirrors the optimized build command + explanation in Copilot’s contributor instructions. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nikolai Emil Damm <ned@devantler.tech>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nikolai Emil Damm <ned@devantler.tech>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nikolai Emil Damm <ned@devantler.tech>
|
@copilot consider applying changes based on the comments in this thread. If feedback is valid apply it, otherwise ignore it. |
|
@devantler I've opened a new pull request, #2105, to work on those changes. Once the pull request is ready, I'll request review from you. |
…se parity (#2105) * Initial plan * docs: use distinct binary name for optimized builds and clarify wording Co-authored-by: devantler <26203420+devantler@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: devantler <26203420+devantler@users.noreply.github.com>
|
@devantler I've opened a new pull request, #2110, to work on those changes. Once the pull request is ready, I'll request review from you. |

Summary
Documents the
-ldflags="-s -w"build optimization flags introduced in #2095, helping contributors understand the difference between development builds and release artifacts.Changes
CONTRIBUTING.md
.github/copilot-instructions.md
Motivation
After the recent build optimization changes (#2095), contributors might notice their local builds are significantly larger than release artifacts. This documentation:
Testing
Related
.goreleaser.yamland CI workflows