Skip to content

Apple Platform 2.2.0

Choose a tag to compare

@kylehughes kylehughes released this 09 Nov 20:31
· 2 commits to main since this release

Apple Platform 2.2.0

Adds guidance on when to use @inlinable. Earlier guidance only warned against it, so agents left public generic package API unspecialized across module boundaries. A new writing-swift reference makes the distribution model the deciding factor: in a library module built from source with its clients, public generic, closure-taking, and trivial value-type API takes @inlinable by default; in a resilient binary framework the body is a permanent commitment and the attribute is added deliberately. The reference also covers @usableFromInline, keeping cold paths out of line, related attributes, and how to verify the effect.

Existing access-control, performance, review, and type-modeling guidance now agrees with the reference and links to it, and the standards auditor loads it for changes that touch public generic API or these attributes. The factory recipe in the package-structure guidance no longer marks its members @inlinable, which would have published the concrete type the factory hides. Corrects the spellings of @inline(__always) and @_specialize.

Validation passed 176 repository tests and the repository and manifest checks. The reference's examples compile with Apple Swift 6.4, with and without library evolution, and a two-module SwiftPM release build confirmed that a public generic function is specialized in its client only once marked @inlinable. Xcode builds, Codex loading, and agent behavior with the new guidance were not exercised.

Update the plugin through its host marketplace and start a new session.