Thank you for your interest in contributing!
- Fork the repository and clone your fork.
- Open
swift-model.xcworkspacein Xcode, or work from the command line withswift build/swift test. - Create a branch for your change:
git checkout -b my-feature.
- Swift 6 / Xcode 16 or later.
- All code must compile with strict concurrency (
swiftLanguageModes: [.v6]). - Changes must build and pass tests on both macOS and Linux.
- Keep changes focused. One logical change per pull request.
- Follow the existing code style (4-space indentation, PascalCase types, camelCase members).
- Do not add public API that is not yet needed. The library is pre-1.0 and the public surface is intentionally kept small.
- Internal symbols use no access modifier (defaulting to
internal). Only addpublicwhen deliberately extending the public API. - Avoid Combine; use
async/awaitandAsyncStream. - Platform compatibility: Apple-platform-only APIs (
UndoManager,objc_setAssociatedObject, etc.) must be guarded with#if canImport(ObjectiveC). SwiftUI-only code with#if canImport(SwiftUI).
swift testTests use the Swift Testing framework (import Testing). Macro expansion tests are in SwiftModelMacroTests/.
- Target the
mainbranch. - Include a short description of what changed and why.
- Ensure CI passes (macOS + Linux).
- For significant changes, open an issue first to discuss the approach.
Please open a GitHub issue with a minimal reproduction case.