-
-
Notifications
You must be signed in to change notification settings - Fork 6
fix: Storage methods return Sendable #206
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
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughThese updates strengthen Swift concurrency safety by adding Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #206 +/- ##
==========================================
- Coverage 91.95% 91.32% -0.63%
==========================================
Files 179 179
Lines 15977 12241 -3736
==========================================
- Hits 14691 11179 -3512
+ Misses 1286 1062 -224 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
Sources/ParseSwift/Coding/ParseEncoder.swift(1 hunks)Sources/ParseSwift/Storage/ParseStorage.swift(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
Sources/ParseSwift/Storage/ParseStorage.swift (1)
Sources/ParseSwift/Storage/ParsePrimitiveStorable.swift (2)
get(46-48)set(50-55)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: test (platform=macOS, test)
- GitHub Check: test (platform=visionOS\ Simulator,OS=2.4,name=Apple\ Vision\ Pro, build)
- GitHub Check: spm-test
- GitHub Check: linux
🔇 Additional comments (2)
Sources/ParseSwift/Storage/ParseStorage.swift (2)
60-63: A POWERFUL Sendable constraint! Your encoding is now HEROICALLY thread-safe!Just like with the
getmethod above, thisSendableconstraint ensures that objects passed into the actor are safe to transfer across isolation boundaries! This is EXACTLY the right approach for actor-isolated storage!The same verification above will confirm whether the
ParsePrimitiveStorableprotocol'ssetmethod signature has been updated to match!
55-58: The async wrapper pattern is correct; no protocol inconsistency exists.ParseStorage doesn't implement ParsePrimitiveStorable. Instead, it uses composition—wrapping a
ParsePrimitiveStorablebacking store (like KeychainStore) and exposing an async interface. The synchronous protocol methods and the async actor methods serve different purposes: the protocol defines sync implementations, while ParseStorage provides an async actor boundary with Sendable constraints for safe cross-isolation calls. This is intentional design, not a mismatch requiring alignment.Likely an incorrect or invalid review comment.
New Pull Request Checklist
Issue Description
Closes: FILL_THIS_OUT
Approach
TODOs before merging