All posts
Post
Widening visibility in Swift packages can expand your ABI and increase the risk of small refactors causing runtime or binary incompatibilities.
- Prefer
internalby default. Expose a minimal, reviewed public facade and use@_implementationOnlyfor dependencies you need to keep out of the public ABI. - Add package-scoped
XCTestsuites that exercise async contracts (continuations, cancellation paths) so race conditions surface earlier. - Commit
Package.resolvedand measure build behavior in CI and locally. Many tiny targets help when your cache and parallelism are reliable; they can hurt wall-clock builds when caches are cold or dependency churn is high. - Instrument package boundaries with
os_signpostand structured logging so performance regressions can be attributed to a package in Instruments or server-side traces.
Choose many small targets when teams own independent lifecycles and CI caching is consistently warm; choose larger grouped targets when cold caches or dependency churn dominate.
How have you staged rollouts or canaried package releases to catch ABI or performance regressions early? Share the checks, CI steps, or rollout patterns that worked for you.