-
Notifications
You must be signed in to change notification settings - Fork 158
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
operators: add fromAsync, fromThrowingAsync, fromAsyncSequence #106
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should not commit this file.
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.
add this to gitignore:
# Ignore all schemes located in swiftpm
**/.swiftpm/**/xcschemes/
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
xcodebuild
can now run swift packages (no Xcode project generate needed).