2.0.0 alpha 2: Producing Productive Producers.
Pre-releaseThis is the second alpha release of ReactiveSwift 2.0. It targets Swift 3.1 with preliminary support of Swift 3.2 and Swift 4.0.
Highlights
-
The performance of
SignalProducer
has been improved significantly. (#140, kudos to @andersio)All lifted
SignalProducer
operators no longer yield an extraSignal
. As a result, the calling overhead of event delivery is generally reduced proportionally to the level of chaining of lifted operators. -
When composing
Signal
andSignalProducer
of inhabitable types, e.g.Never
orNoError
,ReactiveSwift now warns about operators that are illogical to use, and traps at runtime when such operators attempt to instantiate an instance. (#429, kudos to @andersio)
Changes
-
interrupted
now respectsobserve(on:)
. (#140)When a produced
Signal
is interrupted, ifobserve(on:)
is the last applied operator,interrupted
would now be delivered on theScheduler
passed toobserve(on:)
just like other events. -
Feedbacks from
isExecuting
to the state of the sameAction
, including allenabledIf
convenience initializers, no longer deadlocks. (#400, kudos to @andersio) -
MutableProperty
now enforces exclusivity of access. (#419, kudos to @andersio)In other words, nested modification in
MutableProperty.modify
is now prohibited. Generally speaking, it should have extremely limited impact as in most cases theMutableProperty
would have been deadlocked already.
Additions
-
New operator:
promoteValue
. (#429) -
promoteError
can now infer the new error type from the context. (#413, kudos to @andersio) -
In Swift 3.2 or later, you can use
map()
with the new Smart Key Paths. (#435, kudos to @sharplet) -
N-ary
SignalProducer
operators are now generic and accept any type that can be expressed asSignalProducer
. (#410, kudos to @andersio)Types may conform to
SignalProducerConvertible
to be an eligible operand.