Skip to content

fix: work around Xcode 27 split-file init-accessor linker regression - #155

Open
Brett-Best wants to merge 1 commit into
unsignedapps:mainfrom
Brett-Best:chore/Xcode-27b1-workaround
Open

fix: work around Xcode 27 split-file init-accessor linker regression#155
Brett-Best wants to merge 1 commit into
unsignedapps:mainfrom
Brett-Best:chore/Xcode-27b1-workaround

Conversation

@Brett-Best

@Brett-Best Brett-Best commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Work around a Swift compiler regression in Xcode 27 that affects FlagTextField initializers defined in secondary files.

FlagTextField has @State storage with an init accessor. With Xcode 27, a secondary-file initializer that initializes the value with self = Self(...) can make SILGen emit a reference to a missing stored-property initialization symbol, causing the client link to fail.

This change:

  • delegates through self.init(...) in the integer and floating-point convenience initializers;
  • applies the iOS/tvOS keyboard type directly after delegation; and
  • makes keyboardType writable so those initializers can assign it.

No dependency or Package.resolved changes 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.

@Brett-Best Brett-Best changed the title chore: Xcode 27b1 workaround chore: Xcode 27b1/2 workaround Jun 23, 2026
@Brett-Best

Copy link
Copy Markdown
Contributor Author

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

@Brett-Best Brett-Best closed this Jul 7, 2026
@Brett-Best Brett-Best reopened this Jul 7, 2026
@Brett-Best Brett-Best changed the title chore: Xcode 27b1/2 workaround chore: Xcode 27b1/2/3 workaround Jul 7, 2026
@Brett-Best

Copy link
Copy Markdown
Contributor Author

This is actually still needed for Xcode 27b3 because you get a linking error now instead of a compiler crash.

@Brett-Best Brett-Best changed the title chore: Xcode 27b1/2/3 workaround chore: Xcode 27b1/2/3/4/5/6 workaround Aug 25, 2026
@Brett-Best
Brett-Best force-pushed the chore/Xcode-27b1-workaround branch from 7eec878 to 7259488 Compare September 9, 2026 06:53
@Brett-Best
Brett-Best marked this pull request as ready for review September 9, 2026 06:54
Copilot AI lite review requested due to automatic review settings September 9, 2026 06:54
@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

@Brett-Best Brett-Best changed the title chore: Xcode 27b1/2/3/4/5/6 workaround fix: work around Xcode 27 split-file init-accessor linker regression Sep 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 delegating self.init(...) in integer and floating-point FlagTextField convenience initializers.
  • Replaces fluent .keyboardType(...) chaining in those initializers with direct keyboardType = ... assignment.
  • Adjusts FlagTextField’s keyboardType stored 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants