-
Notifications
You must be signed in to change notification settings - Fork 213
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
Implementation for ObservableObject with Mirror #201
Implementation for ObservableObject with Mirror #201
Conversation
Codecov Report
@@ Coverage Diff @@
## master #201 +/- ##
==========================================
+ Coverage 97.30% 97.61% +0.31%
==========================================
Files 98 98
Lines 6649 6676 +27
==========================================
+ Hits 6470 6517 +47
+ Misses 179 159 -20
Continue to review full report at Codecov.
|
c1d76aa
to
9b075e4
Compare
9b075e4
to
65805ae
Compare
LGTM Generated by 🚫 Danger Swift against d32eec6 |
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.
There are a few more tests in the original PR that could be added here as well.
dc648b4
to
c23978e
Compare
c23978e
to
e3df3b1
Compare
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.
👏
Hi @broadwaylamb, would you have a moment to look at this? The lack of working |
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.
Sorry for the delay. Left some comments, overall this looks very good as a temporary solution, until I come up with a proper implementation which will also work with classes that conform to CustomReflectable
.
var counter = 0 | ||
|
||
// A bug in Combine (FB7471594). It should not crash. Why would it crash? | ||
assertCrashesOnDarwin { |
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.
This bug has been fixed, it doesn't crash anymore. Let's remove this.
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.
Hmm, it seems this bug is not fixed on macOS 10.15.7. Which version are you using?
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.
The latest iOS. Combine on macOS is always a little bit behind its iOS version.
I case of Catalina, it is quite behind.
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.
So should we run this test suit on only iOS?
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.
When testing against Combine — yes. But this applies to all the tests, not just this.
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.
I addressed 👍
// A bug in Combine (FB7471594). This has been fixed on iOS. | ||
// But not deployed on other Darwin OS yet | ||
#if !OPENCOMBINE_COMPATIBILITY_TEST || os(iOS) |
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.
No, this condition is not needed. What I mean is that one should make sure to only run compatibility tests against the most recent version of Combine (since that's what we aim to be compatible with). It so happens that the most recent version of Combine is usually vendored in the newest iOS version (not even the newest macOS version, and certainly not Catalina).
Tests should not be disabled based on that.
Just FYI, you can run the compatibility tests in the iOS simulator, this way they should pass. This is exactly what we do on our CI build.
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.
done
bdfe91b
to
d32eec6
Compare
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.
Thank you!
Ported from @MaxDesiatov and @broadwaylamb's work and stripped wickwirew/Runtime dependency and unsafe operations.
This implementation only depends on
Mirror
.