ReactiveSwift icon indicating copy to clipboard operation
ReactiveSwift copied to clipboard

Add `asyncStream` and `asyncThrowingStream` for `Signal` and `SignalProducer`

Open Marcocanc opened this issue 2 years ago • 1 comments

This is a proposal to add asyncStream and asyncThrowingStream in order to bridge into Swift Concurrency. I find this especially useful for writing non-blocking async tests.

A couple of things I'd love to hear your thoughts on (apart from the usual review):

  • General thoughts on the idea
  • Where to place these extensions within the project and naming of files
  • Raising of CI platform to Xcode 11 (due to minimum Swift and testing target version requirements)
  • Lack of support for Swift Concurrency in Quick/Nimble (leading to tests written with XCTest)

Note: Mac Catalyst builds are failing to launch on pre-monterey macOS versions: There is a workaround described in the documents but probably not worth implementing in the CI. More info here.

Mac Catalyst apps that use Swift Concurrency may fail to launch on an operating system prior to macOS Monterey. (84393581)

Marcocanc avatar Nov 12 '21 06:11 Marcocanc

Interestingly the macCatalyst issue is known in Xcode 13.2 Beta https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2-release-notes There's a workaround, but probably worth waiting (and hoping for a fix in 13.2 GA) rather than modifying the SDK in the CI.

Marcocanc avatar Nov 14 '21 19:11 Marcocanc