fix: work around Xcode 27 split-file init-accessor linker regression - #155
fix: work around Xcode 27 split-file init-accessor linker regression#155Brett-Best wants to merge 1 commit into
Conversation
|
This is not needed for Xcode 27b3 although I'm seeing some other issues around some trait complaints which seem to not be 100% reproducible lol |
|
This is actually still needed for Xcode 27b3 because you get a linking error now instead of a compiler crash. |
7eec878 to
7259488
Compare
|
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to initializer patterns and preserves behavior while addressing the stated Xcode 27 regression workaround.
Pull request overview
This PR implements a workaround for an Xcode 27 Swift compiler/linker regression affecting split-file init-accessors by avoiding self = Self(...) initialization patterns in FlagTextField convenience initializers.
Changes:
- Replaces
self = Self(...)with delegatingself.init(...)in integer and floating-pointFlagTextFieldconvenience initializers. - Replaces fluent
.keyboardType(...)chaining in those initializers with directkeyboardType = ...assignment. - Adjusts
FlagTextField’skeyboardTypestored property visibility to allow assignment from the convenience initializers defined in other files.
File summaries
| File | Description |
|---|---|
| Sources/Vexillographer/FlagControl/FlagTextField+Integer.swift | Switches integer convenience initializers to delegating init + direct keyboard type assignment. |
| Sources/Vexillographer/FlagControl/FlagTextField+FloatingPoint.swift | Switches floating-point convenience initializers to delegating init + direct keyboard type assignment. |
| Sources/Vexillographer/FlagControl/FlagTextField.swift | Makes keyboardType assignable from extension initializers while keeping runtime behavior the same in body. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.



Summary
Work around a Swift compiler regression in Xcode 27 that affects
FlagTextFieldinitializers defined in secondary files.FlagTextFieldhas@Statestorage with an init accessor. With Xcode 27, a secondary-file initializer that initializes the value withself = Self(...)can make SILGen emit a reference to a missing stored-property initialization symbol, causing the client link to fail.This change:
self.init(...)in the integer and floating-point convenience initializers;keyboardTypewritable so those initializers can assign it.No dependency or
Package.resolvedchanges are included.Upstream status
The compiler problem is tracked in Swift issue #91700. The proposed fix is Swift PR #91895. As of 2026-09-09, #91895 remains open and in draft and will not make Xcode 27, so this PR remains the workaround for affected Xcode 27 toolchains.