Skip to content

Commit 4cfdccd

Browse files
committed
spec: document subpackage artifact tradeoff
Explain why subpackages share the root artifact model while rejecting the sole unsupported strip control at validation time. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
1 parent 22acb5d commit 4cfdccd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

subpackage.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ func (s *SubPackage) validate() error {
130130
}
131131

132132
if s.Artifacts != nil {
133+
// Subpackages deliberately reuse the root Artifacts public model. DisableStrip
134+
// is currently its sole unsupported field, so accepting one representable
135+
// invalid state avoids maintaining nearly identical public types.
133136
if s.Artifacts.DisableStrip {
134137
errs = append(errs, fmt.Errorf("artifacts: disable_strip is only valid for root package artifacts"))
135138
}

0 commit comments

Comments
 (0)