-
Notifications
You must be signed in to change notification settings - Fork 0
Lowered SDK requirements to macOS 14 #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes introduce a new computed property for deduplicating inferred property types in Changes
Sequence Diagram(s)sequenceDiagram
participant TestSuite as PropertiesListTests
participant Parser as PropertiesList
participant Syntax as TypeSyntax
TestSuite->>Parser: Parse class declaration
Parser->>Parser: Categorize properties (immutable, mutable, etc.)
TestSuite->>Parser: Request uniqueInferredTypes
Parser->>Parser: Extract and deduplicate inferred types
Parser->>Syntax: Compare types using isLike(_:)
Syntax->>Syntax: Standardize and trim descriptions
Syntax-->>Parser: Return comparison result
Parser-->>TestSuite: Return results for assertions
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (4)
Package.swift
(1 hunks)Sources/PrincipleMacros/Parsers/Properties/PropertiesList.swift
(1 hunks)Sources/PrincipleMacros/Syntax/Extensions/TypeSyntax.swift
(1 hunks)Tests/PrincipleMacrosTests/Parsers/PropertiesListTests.swift
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
Tests/PrincipleMacrosTests/Parsers/PropertiesListTests.swift (1)
Sources/PrincipleMacros/Parsers/Properties/PropertiesList.swift (1)
withInferredType
(62-64)
🪛 SwiftLint (0.57.0)
Package.swift
[Warning] 6-6: Top-level declarations should specify Access Control Level keywords explicitly
(explicit_top_level_acl)
[Warning] 1-1: Header comments should be consistent with project patterns
(file_header)
[Warning] 6-6: Top-level constants should be prefixed by k
(prefixed_toplevel_constant)
Tests/PrincipleMacrosTests/Parsers/PropertiesListTests.swift
[Warning] 19-19: Type declaration should start with an empty line.
(empty_line_after_type_declaration)
🪛 GitHub Actions: Pull request
Tests/PrincipleMacrosTests/Parsers/PropertiesListTests.swift
[error] 19-19: SwiftLint: Empty line after type declaration Violation: Type declaration should start with an empty line. (empty_line_after_type_declaration)
🔇 Additional comments (5)
Package.swift (2)
1-1
: Swift tools version downgraded to enhance compatibilityThe Swift tools version has been downgraded from 6.1 to 6.0, which will increase compatibility with older toolchains.
🧰 Tools
🪛 SwiftLint (0.57.0)
[Warning] 1-1: Header comments should be consistent with project patterns
(file_header)
9-14
: Platform requirements lowered for broader compatibilityAll minimum platform versions have been reduced to support older OS versions:
- macOS: 15 → 14
- macCatalyst, iOS, tvOS: 18 → 17
- watchOS: 11 → 10
- visionOS: 2 → 1
This change aligns with the PR title and increases the package's compatibility with older systems.
Sources/PrincipleMacros/Syntax/Extensions/TypeSyntax.swift (1)
13-15
: Improved type comparison with standardizationThe
isLike(_:)
method now compares the standardized form of types before comparing their trimmed descriptions. This enhancement ensures that syntactically different but semantically equivalent types (e.g.,Int?
andOptional<Int>
) will be recognized as the same type.This change provides more robust type comparisons and supports the new
uniqueInferredTypes
property in PropertiesList.Sources/PrincipleMacros/Parsers/Properties/PropertiesList.swift (1)
49-60
: Well-implemented property for unique type collectionThe new
uniqueInferredTypes
computed property effectively collects all inferred types from properties while ensuring uniqueness. The implementation:
- Uses lazy evaluation for mapping properties to their types
- Creates a dictionary to eliminate duplicates
- Returns types sorted by description for deterministic ordering
This is a valuable addition that complements the existing type-filtering functionality and provides a clean way to access all unique types used in properties.
Tests/PrincipleMacrosTests/Parsers/PropertiesListTests.swift (1)
13-142
: Comprehensive test coverage for PropertiesList functionalityThis new test file thoroughly validates all aspects of the
PropertiesList
including:
- Property categorization (immutable, mutable, instance, type, stored, computed)
- The new
uniqueInferredTypes
property- Type filtering with
withInferredType(like:)
The test class declaration includes a diverse set of property types that provides excellent coverage of the various scenarios.
🧰 Tools
🪛 SwiftLint (0.57.0)
[Warning] 19-19: Type declaration should start with an empty line.
(empty_line_after_type_declaration)
🪛 GitHub Actions: Pull request
[error] 19-19: SwiftLint: Empty line after type declaration Violation: Type declaration should start with an empty line. (empty_line_after_type_declaration)
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
Summary by CodeRabbit