-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix SwiftUI warnings. #92
Conversation
Thanks @Andrewangeta 🙇 . The tests are failing and I expect it's because of the async dispatch introduced, since the tests were before expecting the wrappers to be synchronously updated. I think there a few ways we could get around that:
I'd personally prefer those over async expectations in order to have tests more deterministic and faster. Let me know what you think. |
When running on Xcode 14.2 I also faced a similar warning in |
Or perhaps will be easier to go with the async await path and make use of |
@marinofelipe Yea I think actors would be a fair approach and to use async await as well. |
Does anyone working on it? because it's useful feature. |
Hi @eliasayele . For sure, as far as I know no one is looking it, would you be interested? |
df73dbc
to
2dcff65
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #92 +/- ##
==========================================
- Coverage 98.09% 98.08% -0.02%
==========================================
Files 22 22
Lines 1420 1460 +40
==========================================
+ Hits 1393 1432 +39
- Misses 27 28 +1 ☔ View full report in Codecov by Sentry. |
Hi @Andrewangeta , I finally got the time to look into it. I kept the same as you did, but just changed it to use a MainActor bound I think we are good to go, thanks a lot for contribution 🙇 ! cc @eliasayele |
This is now part of the 3.0.1 release, cheers! |
Why?
Writing to the underlying
wrappedValue
of a property wrapper wasn't guaranteed to be on the main thread depending on how a user might be using it.Changes
This makes that guarantee by wrapping those write operations in a
DispatchQueue
Tests
Verified on a real device using iOS 16.2 and Xcode 14.2
Issue 91