operators: add fromAsync, fromThrowingAsync, fromAsyncSequence#106
operators: add fromAsync, fromThrowingAsync, fromAsyncSequence#106
Conversation
Codecov Report
@@ Coverage Diff @@
## main #106 +/- ##
==========================================
- Coverage 97.23% 95.21% -2.03%
==========================================
Files 62 60 -2
Lines 3323 3236 -87
==========================================
- Hits 3231 3081 -150
- Misses 92 155 +63
Continue to review full report at Codecov.
|
c6d594e to
8c97c8c
Compare
|
@freak4pc the code coverage does not seem happy, but I don't know why. The new code has a 100% coverage but the overall percentage seems to be lower than before.Do you know why ? (it's like that unit tests code coverage is taken into account) |
…dge async/await with Combine
8c97c8c to
52c52be
Compare
|
Hi @freak4pc, do you have an idea of what's going on with the code Do we want to go forward with this async/await -> Combine bridge ? |
|
is there an update on this? |
| #if canImport(Combine) | ||
| import Combine | ||
|
|
||
| @available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *) |
There was a problem hiding this comment.
I believe this can be:
#if compiler(>=5.5) && canImport(_Concurrency)rather than forcing iOS15
https://www.swiftbysundell.com/special/swift-concurrency-backward-compatibility/
|
Seems Publishers.fromThrowingAsync(priority: TaskPriority.background, { () -> [EventEntity] in
let result = try await self.useCase.invoke(forceRefresh: true)
return result
})
.subscribe(on: RunLoop.main)
.eraseToAnyPublisher()The |
| @@ -0,0 +1,91 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
I think you should not commit this file.
There was a problem hiding this comment.
add this to gitignore:
# Ignore all schemes located in swiftpm
**/.swiftpm/**/xcschemes/
|
I'm going to close this since it's super-old and I'm trying to clean up this repo. If this is still an issue / or something you'd like to pursue, feel free to comment and we can re-discuss. Thanks! |
This PR bridges structured concurrency with Combine by adding:
The CI has been adapted to allow the usage of Xcode 13/Swift 5.5.
The SPM section has been removed since
xcodebuildcan now run swift packages (no Xcode project generate needed).