294 Commits

Author SHA1 Message Date
Saleem Abdulrasool 1c6f02c7ed COpenCOmbineHelpers: add an explicit modulemap
Introduce an explicit modulemap as not all build systems will write out
a modulemap for you.  Add the explicit modulemap to allow building with
alternative build systems.
2023-10-20 09:15:55 +03:00
Sergej Jaskiewicz 8f8ef5057d Update for Xcode 14 2023-04-23 18:11:38 +02:00
Sergej Jaskiewicz fdc7550ff7 Fix SwiftLint, make it strict 2022-02-01 18:58:40 +03:00
Sergej Jaskiewicz 8bfdcd4295 Migrate compatibility tests from CircleCI to GitHub Actions 2022-02-01 18:58:40 +03:00
Sergej Jaskiewicz ea8938db72 Add tests for Publisher concurrency extensions, fix implementation 2022-02-01 18:58:40 +03:00
Sergej Jaskiewicz c96f2e300d Update availability annotations for concurrency extensions 2022-02-01 18:58:40 +03:00
Sergej Jaskiewicz 4b2c87a0bb Update Future implementation 2022-02-01 18:58:40 +03:00
Sergej Jaskiewicz 0243fd063d Enable concurrency only since Swift 5.5 2022-02-01 18:58:40 +03:00
Sergej Jaskiewicz 4716805f12 Make it compile 2022-02-01 18:58:40 +03:00
Sergej Jaskiewicz c911862a24 [Xcode 13] Implement async/await support for publishers (no tests yet) 2022-02-01 18:58:40 +03:00
Sergej Jaskiewicz f823f7b18c Introduce take() helper method 2022-02-01 18:58:40 +03:00
Sergej Jaskiewicz 02d1494ce9 [Xcode 13] Fix implementation so tests pass 2022-02-01 18:58:40 +03:00
Marcus Ficner 7d0a8cd6f8 Fix typo in Publishers.FlatMap.swift (#228) 2022-01-23 12:37:12 +00:00
ArthurChi ef0288e075 Implement Zip operator (#222)
Co-authored-by: Eric Patey <eric@patey.com>
Co-authored-by: Max Desiatov <max@desiatov.com>
Co-authored-by: ArthurChi <chijie@bytedance.com>
Co-Authored-By: Sergej Jaskiewicz <broadwaylamb@users.noreply.github.com>
2021-11-22 00:29:57 +01:00
Sergej Jaskiewicz 1879860f35 I'm so tired of the Swift team breaking things on non-Darwin platforms
https://forums.swift.org/t/formalizing-the-unavailability-of-core-foundation/40216
2021-09-24 16:26:09 +03:00
Sergej Jaskiewicz 12700a0500 Make COpenCombineHelpers buildable on Windows 2021-09-24 16:26:09 +03:00
Sergej Jaskiewicz 3d3adb564b Release the Suffix publisher in Concatenate's Inner 2021-07-29 01:48:45 +03:00
Sergej Jaskiewicz 925bee4af9 Fix reentrancy bugs in Subscribers.Assign 2021-07-29 01:48:45 +03:00
Sergej Jaskiewicz adcee8c14d Fix reentrancy bugs in Subscribers.Sink 2021-07-29 01:48:45 +03:00
Sergej Jaskiewicz 4060ee9f57 Fix compatibility with Xcode 12.5 toolchain and SDKs 2021-06-21 17:38:33 +03:00
Sergej Jaskiewicz cd45c77fac Implement Publishers.PrefixUntilOutput 2021-02-22 20:47:35 +03:00
Stuart Austin e618d179fe Add Publishers.Throttle implementation (#195)
* Publishers.Throttle implementation with tests

* Fix Throttle lint errors and removed expectation from throttle tests. Add additional test for cancelling a subscription before a scheduled value is emitted

* Fix VirtualTimeScheduler's executeSchedulesActions default deadline not being far enough into the future on 32-bit platforms.

* Fixed multiple lint errors

* Improve Publishers.Throttle code coverage by removing enum for pending emissions

* Additional Throttle test for cancelling a Subscriber when an output has been scheduled

* ThrottleTests now run on WASI
2021-02-18 13:56:55 +00:00
Marcus Scherer 4fa5f48c19 Fix typo (#204) 2021-02-08 19:41:49 +03:00
Grigory Entin 3d61bf87e7 Fixed Timer(timeInterval:,repeats:,block:) not accounting timeInterval for the first fire date. (#196)
https://github.com/OpenCombine/OpenCombine/blob/master/Sources/OpenCombineFoundation/Helpers/Portability.swift#L58-L64

It looks like this was a typo/something overlooked, but basically, this `fire: Date()` breaks at least every timer publisher like `Timer.publish(every: timeInterval, on: .main, in: .default)`, as it basically results in the *first* event fired immediately vs in timeInterval. (Just in case, no, Combine does not fire that extra event).

* Fixed Timer(timeInterval:,repeats:,block:) not accounting timeInterval for the first fire date.

* Fixed Danger warning about line length.
2021-01-29 13:42:17 +00:00
Max Desiatov 911a4e1aa3 Add OpenCombineShim product for easier importing (#197) 2021-01-25 17:25:28 +03:00
Yuta Saito beb38dec0e Implementation for ObservableObject with Mirror (#201)
A temporary implementation until we implement the proper type metadata introspection.
2021-01-25 17:24:19 +03:00
Sergej Jaskiewicz 5436868053 Fix some lock acquiring in Publishers.FlatMap (#194) 2020-11-08 17:44:33 +03:00
Sergej Jaskiewicz 4977ca158f Update DispatchQueue scheduler to match iOS 14.2 behavior 2020-11-07 17:28:08 +03:00
Sergej Jaskiewicz 21fda909f5 Implement Publishers.Retry 2020-11-07 17:28:08 +03:00
Max Desiatov e054a884ef Add support for SwiftWasm with CI and tests (#191)
WebAssembly support for atomics and multi-threading isn't fully standardized yet, and it not supported in SwiftWasm at the moment. Because of this Dispatch is unavailable, and all Combine-related Foundation stuff is unavailable too. Tests related to this are disabled. Locking functions are replaced with no-op shims.
2020-11-02 22:02:39 +00:00
Sergej Jaskiewicz 8a0bb6f846 [Xcode 12] Update Publishers.Debounce implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 142811c500 [Xcode 12] Update @Published implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 3b1cff9337 [Xcode 12] Implement Optional.publisher property 2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz efb4369c74 [Xcode 12] Add new flatMap(maxPublishers:_:) overloads 2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 9d87a3b4ea [Xcode 12] Update Publishers.Buffer implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 4714b80631 [Xcode 12] Update Publishers.Drop implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz b2f592611d Enable tests on Ubuntu using Swift 5.0 and make them pass 2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 8832baa05b [Xcode 12] Update Publishers.ReplaceError implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 11fdf7eaf3 [Xcode 12] Update Publishers.[Encode|Decode] implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 059a86d393 [Xcode 12] Update Publishers.CompactMap implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz c1b4d93a0f [Xcode 12] Update Publishers.Filter implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz fb184ceebe [Xcode 12] Add new switchToLatest() overloads 2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 69b50074ff [Xcode 12] Update AnyPublisher and AnySubscriber initializers
The new version avoids double boxing.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 7351cd671c [Xcode 12] Update documentation 2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 26e112f894 [Xcode 12] Implement _Introspection functionality
_Introspection allows to observe the subscription graph and data flow.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 6c732515d8 [Xcode 12] Update Publishers.Delay implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 6892923743 [Xcode 12] Update Timer publisher implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz f8809ffac4 [Xcode 12] Update Publishers.HandleEvents implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz 5da402bb2c Fix a deprecation warning in Publishers.Breakpoint implementation 2020-10-29 19:49:34 +03:00
Sergej Jaskiewicz e962ce1e3b [Xcode 12] Update OperationQueue scheduler implementation and tests
The tests now pass in compatibility mode when run against iOS 14 Combine.
2020-10-29 19:49:34 +03:00