SPB Git

Repository Public License

0001-macos-version-and-toolchain.md 2.1 KB

# ADR 0001 — Minimum macOS version, toolchain and build layout

Status: accepted (2026-11-22)

# Context

Development machine: macOS 27.0 (26A5425a), Xcode 27.2, Swift 6.4.2, Apple silicon. Signing identities present: one Developer ID Application, two Apple Development. xcodegen is installed; SwiftLint and SwiftFormat are not.

# Options

  1. Deployment target = installed macOS (27). Newest APIs, smallest audience.
  2. Current minus one major (26), the directive's recommended default.
  3. Older (15), widest audience, more availability checks, cannot be tested here.

# Decision

  • Deployment target macOS 26 (.macOS(.v26)), Swift tools 6.2+, Swift 6 language mode (strict concurrency) for every target.
  • One root Package.swift; each module is a target whose sources live under packages/<name>/Sources with tests under packages/<name>/Tests. Modules are added only when they hold real code and tests.
  • Apps are SwiftPM executables (apps/prism-macos, apps/prism-satellite-host, apps/prism-cli). scripts/build.sh wraps the executables into .app bundles (Info.plist, icon, resources, code signature). No Xcode project is checked in.
  • No SwiftPM resource bundles in targets linked into apps. Bundle.module of an executable resolves next to the .app root, which breaks code signing. Catalog manifests are Swift values; templates are copied into Contents/Resources by the build script and read through Bundle.main.
  • No third-party dependencies in V1. SQLite, CryptoKit, Swift Charts, Security and AppKit come with the system.
  • Lint = compiler warnings treated as errors in scripts/verify.sh plus scripts/lint.sh (repository-specific checks: no secrets, no dead-control markers, file size cap). Adding SwiftLint is an install outside the repository and needs the owner's approval.

# Consequences

  • Nothing is verified on macOS 26; only macOS 27 has been run. STATUS.md says so.
  • UI automation through XCUITest needs an Xcode project; until one is justified, UI behaviour is tested through view models and off-screen rendering under swift test, and smoke-tested by launching the bundle.
Files main
Menu

Theme