Skip to content

build: dev does not compile on Xcode 27 — SwiftUI.Document now collides with InterlinedDomain.Document #98

Description

@Adron

dev does not build on Xcode 27. This blocks every open PR and every new one.

What happened

Xcode was updated on this machine at 12:23 on 2026-09-15, mid-session — builds from the same commit succeeded before it and fail after.

The macOS 27 SDK adds a Document protocol to SwiftUI:

SwiftUI.Document:4:17: note: found this candidate
  public protocol Document : ReadableDocument, WritableDocument {

InterlinedDomain has exported a Document struct since M4. Any file that imports both — which is every documents-feature view — now has an ambiguous Document in scope.

The errors

Nine sites, six files, all in App/Features/**:

App/Features/AI/AIDocumentSheet.swift:25:21
App/Features/Documents/ConflictBannerView.swift:18:27
App/Features/Documents/DocumentEditorView.swift:24:27
App/Features/Documents/DocumentsListView.swift:15:20
App/Features/Documents/DocumentsListView.swift:24:20
App/Features/Documents/DocumentsListView.swift:106:19
App/Features/Documents/DocumentsRootView.swift:436:21
App/Features/Documents/DocumentsRootView.swift:452:15
App/Features/Documents/DocumentTemplatePickerView.swift:39:21

Every one is import SwiftUI + import InterlinedDomain with a bare Document used as a type.

Note the view models are unaffected — they import Foundation, Observation and InterlinedDomain, not SwiftUI. It is exactly the SwiftUI-importing files, which is what makes the diagnosis unambiguous.

Fix

Qualify the domain type at the use sites: InterlinedDomain.Document.

Considered and rejected:

  • Renaming the domain type. Document is the correct domain name and it is right across the Kit/Domain/Persistence layers and their tests. Renaming a core model to dodge a name collision in one consumer is the tail wagging the dog.
  • A module-level typealias ILDocument = InterlinedDomain.Document. Shorter at the use sites, but it introduces a second name for one concept, and the next reader has to learn that ILDocument and Document are the same thing. Explicit qualification says exactly what it means.
  • Dropping import SwiftUI. Not possible; these are SwiftUI views.

Worth knowing for the future

This is a standing hazard, not a one-off. Any domain type sharing a name with a SwiftUI symbol is one SDK update away from the same break. Current domain models at risk by name: Document, Message, List-adjacent names, Section-adjacent names. Nothing to do pre-emptively, but the diagnosis is worth writing down so the next occurrence takes minutes rather than an afternoon.

Acceptance

  • xcodebuild build -scheme InterlinedList -destination 'platform=macOS' → ** BUILD SUCCEEDED ** on Xcode 27.
  • No domain model is renamed.
  • The full gate is green.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions