Skip to content

fix: build with Xcode 27 - #277

Draft
ethanndickson wants to merge 1 commit into
chore/bump-nixpkgsfrom
fix/xcode-27
Draft

ethanndickson wants to merge 1 commit into
chore/bump-nixpkgsfrom
fix/xcode-27

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

I'm only doing this because I can't test the damn changes in #275 otherwise. I'm on Xcode 27 locally, and the app doesn't compile with it:

Coder-Desktop/Coder-Desktop/Views/ButtonRow.swift:6:9: error: variable 'self.label' used before being initialized

ButtonRowView had @ViewBuilder on a stored closure property, which we also assigned from a custom init, and the newer compiler rejects that. The fix is just to move @ViewBuilder onto the init parameter and store the built view instead of the closure, which is how SwiftUI's own containers do it. I also set the initial @State with State(initialValue:) rather than assigning to the wrapped value.

The rest is small cleanups from building with Xcode 27, i.e. dropping redundant Sendable conformances on internal types (they're inferred), and filter { ... }.count to count(where:).

CI still pins Xcode 26.5, so it never hit this. I haven't built this on 26.5 locally, but CI will.

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.

1 participant