Comments (10)
The difference between CombineX and OpenCombine, FYI.
Diff | CombineX | OpenCombine |
---|---|---|
First Commit | Jun 9, 2019 | Jun 10, 2019 |
Progress | Almost 100% | About 30% |
Managed by | Organization | Individual |
Combine Compatibility | Yes (with CXCompatible and CXShim) | No |
Side Projects | CXCocoa and CXExtensions | No |
Dependency | Foundation.NSLock | No |
Supported Platform | Apple, Linux, Windows | Apple, Linux |
Supported Library | Foundation and Dispatch (with CXFoundation) | Dispatch (with OpenCombineDispatch) |
API / Behaviour Consistency | Yes | Yes |
Description / Reflaction Consistency | No | Yes |
from combinex.
Corresponding issue: OpenCombine/OpenCombine#80
from combinex.
Thanks
from combinex.
If we're doing comparison here, I guess it'd be fair to add that:
- OpenCombine does not depend on Foundation and Dispatch (except for OpenCombineDispatch and OpenCombineFoundation shims that were deliberately moved into separate modules). CombineX uses Foundation's
NSLock
under the hood for locking, AFAICT. - Just checked: out of 348 tests in the OpenCombine test suite, 162 are failing when run against CombineX and passing when run against Apple's Combine. 1 test results in a crash (so I commented it out). This is 46% fail rate. And those are the tests that compile. There are actually more tests in the OpenCombine test suite, but they don't compile because some publishers in CombineX don't conform to
Equatable
, when they should. - Out of those 115 CombineX tests that compile against OpenCombine (yep, in OpenCombine fewer operators are implemented, for now), only 15 are failing when run against OpenCombine, resulting in 12% fail rate.
Yep, I could quickly implement the remaining operators with the semantics "somewhat close" to Combine and after that start gradually fixing it, but I chose to polish all the nontrivial corner cases before releasing the code with unexpected behavior, so that it has exactly the same semantics (and performance!) as Combine. Both approaches are perfectly valid, but I personally most enjoy the latter.
But still, great job with implementing the functionality so quickly, @luoxiu!
(Attaching the files so you could reproduce my test results)
from combinex.
I also think merging efforts makes sense and there should be a way to find a common way of doing implementation and git workflow etc. I think both sides have their advantages and disadvantages. it feels like a wasted effort with two projects aiming to do the same thing. Maybe we can start with a common test suite.
from combinex.
@broadwaylamb Wow! Thanks!
I will trace these failed tests~ As I said on README, at the moment, the number of tests is far from enough, we do need more tests.
from combinex.
@broadwaylamb I just deleted a reply because my partner @ddddxxx said it was a bit offensive to read.
If it's true, sorry for my poor English, 🤣
from combinex.
@luoxiu no worries, I haven't found it offensive at all.
from combinex.
Thanks for the advice! I am willing to learn OpenCombine's advantages. As for merging, that would be very troublesome...
from combinex.
@broadwaylamb Thanks for your clarification (I've updated my comparison between CombineX and OpenCombine). I think we all agree that due to different design choice we made, Merging CombineX and OpenCombine do more harm than good. Though there's still some waste efforts can be avoided. I think we could share test cases.
CXShim is designed to filling the gap between different Combine implementation. We can build tests on it.
from combinex.
Related Issues (20)
- `Published` runtime error: Simultaneous accesses to 0x**, but modification requires exclusive access HOT 1
- Format `swift test` output on CI
- Update Package.swift to Swift 5.3 HOT 2
- Zip3 Operator HOT 3
- Set Environment Variable CX_COMBINE_IMPLEMENTATION = "CombineX" for CI HOT 3
- Build errors: missing Lock.swift, Extensions.swift in CXUtility HOT 2
- `ObservableObjectPublisher` requires implementation. HOT 2
- Outdated CocoaPods version HOT 3
- Publishers.FlatMap should forward unlimited request
- Build failure when use CXShim + Combine + iOS (No such module 'Combine') HOT 2
- When trying to use debounce neither RunLoop nor DispatchQueue seems to conform to Scheduler HOT 2
- Rename `CXWrappers` -> `CX` HOT 4
- Optional and Result operator specialization
- Crash when demangling Failure HOT 3
- Subject should not invoke receiveValue on multiple threads at the same time HOT 1
- Crash when using debounce (100%) HOT 3
- Debounce keeps emitting values even though debounced publisher is not publishing HOT 6
- add carthage&cocoapods installation validation to ci HOT 2
- consider adapting Apple's implementations of Foundation and Dispatch publishers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from combinex.