feat: add slim binary release variant - #858
Open
apstndb wants to merge 3 commits into
Open
Conversation
Code Metrics Report📊 View detailed coverage report (available for 7 days)
Details | | main (b7c135d) | #858 (29d185e) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 74.0% | 74.0% | -0.1% |
| Files | 94 | 95 | +1 |
| Lines | 8093 | 8096 | +3 |
| Covered | 5993 | 5993 | 0 |
+ | Code to Test Ratio | 1:1.3 | 1:1.3 | +0.0 |
| Code | 18876 | 18885 | +9 |
+ | Test | 26133 | 26180 | +47 |
- | Test Execution Time | 1m42s | 1m43s | +1s |Code coverage of files in pull request scope (88.5% → 87.5%)
Reported by octocov |
…slim-binary-workplan
Describe the full-versus-slim build as a relative-size check with identical CGO, stripping, and target settings, not as byte-identical GoReleaser output. Use feature-specific flags/system variables so BigQuery omissions are not under-described.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cmd/spanner-mycli-slim, a second main package that registers no optional featuresThis uses separate main packages rather than build tags, so ordinary
go test ./..., vet, and lint continue to compile both variants. It is stacked on the GoReleaser scaffold cleanup in #789.The primary rationale is least capability: users who do not need the optional statement families can choose a binary that does not link their client and protocol dependencies. This narrows the shipped process's optional runtime surface. It does not reduce the repository's
go.mod, source, CI, or dependency-maintenance surface, and it is not a security or vulnerability-free guarantee.Size evidence
Built as a controlled relative comparison with the same Go toolchain and target,
CGO_ENABLED=0,-trimpath, and-s -w. These are not claims of byte identity with GoReleaser archives:Validation
goreleaser check --config .goreleaser.yamlgo test -short ./...make checkwith golangci-lint v2.13.2git diff --check issue-778-goreleaser-scaffold...HEADFollow-ups
Registration-time mutation-policy enforcement and feature-package completion construction are separate seam-contract gaps and are not required to link the slim binary. They remain separate follow-ups rather than expanding this release-artifact change.
Depends on #789.