Repository navigation
Add partial SwiftData model macro support - #10
Draft
linecodesxx wants to merge 2 commits into
Draft
linecodesxx wants to merge 2 commits into
linecodesxx wants to merge 2 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
SwiftData models compiled through OpenAppleMacros fail to expand
@Modeland@Attributebecause the server does not provide theirSwiftDataMacrosimplementations. This prevents xtool from building applications that use these macros.Changes
@Modelinto persistent backing storage, schema metadata, observation support, a backing-data initializer, and protocol conformances. Stored properties receive generated accessors that read and write through SwiftData, including transformable values.@Attributeoptions in schema metadata and provide basic handling of@Relationshipand@Transientproperties.Support is partial: additional diagnostics and edge cases still need verification, including compatibility with Xcode 27.
Xcode 26.5 and 27 comparison
The table covers differences identified in Apple's published documentation, not an exhaustive SDK diff. The Xcode 27
swiftinterfaceand macro expansions have not been compared directly.@Modeland@Attribute@Attribute(.codable)Codabletypes as encoded data.@QuerysectionBy:support is unavailable.@Queryis a separate unsupported macro in this project.ResultsObserverandHistoryObserver@Relationshipand@TransientSources: Apple's Xcode SDK requirements and What's new in SwiftData.
Validation
OAM_IGNORE_XCODE_VERSION=1).Xcode 27 has not been tested locally because it requires an Apple silicon Mac; the available machine uses an Intel-compatible processor.
Help wanted
Contributions are welcome, especially from anyone who can test the macro expansions against Xcode 27 on Apple silicon. Help with the remaining edge cases, diagnostics, and unverified SwiftData 27 behavior would also be appreciated.