@andersio andersio released this Jul 17, 2018 · 18 commits to master since this release

Assets 2

This is the first release of ReactiveSwift 4.0. It requires Swift 4.1 or above.

Xcode 10 Support

  1. Swift 4.2 and Xcode 10 support (#644, kudos to @ikesyo)

Operators

  1. New method collect(every:on:skipEmpty:discardWhenCompleted:) which delivers all values that occurred during a time interval (#619, kudos to @Qata)
  2. debounce now offers an opt-in behaviour to preserve the pending value when the signal or producer completes. You may enable it by specifying discardWhenCompleted as false (#287, kudos to @Qata)
  3. New property operator: filter (#586, kudos to @iv-mexx)
  4. New operator merge(with:) (#600, kudos to @ra1028)
  5. New operator map(value:) (#601, kudos to @ra1028)
  6. SignalProducer.merge(with:), SignalProducer.concat, SignalProducer.prefix, SignalProducer.then, SignalProducer.and, SignalProducer.or, SignalProducer.zip(with:), SignalProducer.sample(with:), SignalProducer.sample(on:), SignalProducer.take(until:), SignalProducer.take(untilReplacement:), SignalProducer.skip(until:), SignalProducer.flatMap, SignalProducer.flatMapError, SignalProducer.combineLatest(with:), Signal.flatMap, Signal.flatMapError, Signal.withLatest(from:) and Property.init(initial:then:) now accept SignalProducerConvertible conforming types (#610, #611, kudos to @ra1028)

Changes: <~ Bindings

  1. <~ bindings now works with optional left-hand-side operands. (#642, kudos to @andersio and @Ankit-Aggarwal)

    let nilTarget: BindingTarget<Int>? = nil
    
    // This is now a valid binding. Previously required manual
    // unwrapping in ReactiveSwift 3.x.
    nilTarget <~ notifications.map { $0.count }

Changes: Conditional Conformance

  1. For Swift 4.1 and above, BindingSource conformances are required to have Error parameterized as exactly NoError. As a result, Signal and SignalProducer are now conditionally BindingSource. (#590, kudos to @NachoSoto and @andersio)
  2. For Swift 4.1 and above, Signal.Event and ActionError are now conditionally Equatable. (#590, kudos to @NachoSoto and @andersio)

Interoperability

  1. Result now interoperates with SignalProducer n-ary operators as a constant producer (#606, kudos to @Qata)

Miscellaneous

  1. When unfair locks from libplatform are unavailable, ReactiveSwift now fallbacks to error checking Pthread mutexes instead of the default. Mitigations regarding issues with pthread_mutex_trylock have also been applied. (#654, kudos to @andersio)
  2. Lifetime may now be manually ended using Lifetime.Token.dispose(), in addition to the existing when-token-deinitializes semantic. (#641, kudos to @andersio)
  3. Bag may now be initialised with a sequence of elements. (#609, kudos to @ra1028)
  4. Non-class types may now conform to ReactiveExtensionProvider. (#636, kudos to @ra1028)
  5. Fix some documentation errors about Carthage usage (#655)
  6. [CocoaPods] CocoaPods 1.4.0 is the minimum required version. (#651, kudos to @ikesyo)

@andersio andersio released this Jun 14, 2018 · 37 commits to master since this release

Assets 2

This is the second release candidate of ReactiveSwift 4.0. It requires Swift 4.1 or above.

Change

  1. Swift 4.2 and Xcode 10 support (#644, kudos to @ikesyo)

@andersio andersio released this Jun 1, 2018 · 47 commits to master since this release

Assets 2

This is the first release candidate of ReactiveSwift 4.0. It requires Swift 4.1.

Operators

  1. New method collect(every:on:skipEmpty:discardWhenCompleted:) which delivers all values that occurred during a time interval (#619, kudos to @Qata)
  2. debounce now offers an opt-in behaviour to preserve the pending value when the signal or producer completes. You may enable it by specifying discardWhenCompleted as false (#287, kudos to @Qata)
  3. New property operator: filter (#586, kudos to @iv-mexx)
  4. New operator merge(with:) (#600, kudos to @ra1028)
  5. New operator map(value:) (#601, kudos to @ra1028)
  6. SignalProducer.merge(with:), SignalProducer.concat, SignalProducer.prefix, SignalProducer.then, SignalProducer.and, SignalProducer.or, SignalProducer.zip(with:), SignalProducer.sample(with:), SignalProducer.sample(on:), SignalProducer.take(until:), SignalProducer.take(untilReplacement:), SignalProducer.skip(until:), SignalProducer.flatMap, SignalProducer.flatMapError, SignalProducer.combineLatest(with:), Signal.flatMap, Signal.flatMapError, Signal.withLatest(from:) and Property.init(initial:then:) now accept SignalProducerConvertible conforming types (#610, #611, kudos to @1028)

Changes: Conditional Conformance

  1. For Swift 4.1 and above, BindingSource conformances are required to have Error parameterized as exactly NoError. As a result, Signal and SignalProducer are now conditionally BindingSource. (#590, kudos to @NachoSoto and @andersio)
  2. For Swift 4.1 and above, Signal.Event and ActionError are now conditionally Equatable. (#590, kudos to @NachoSoto and @andersio)

Interoperability

  1. Result now interoperates with SignalProducer n-ary operators as a constant producer (#606, kudos to @Qata)

Miscellaneous

  1. Lifetime may now be manually ended using Lifetime.Token.dispose(), in addition to the existing when-token-deinitializes semantic. (#641, kudos to @andersio)
  2. Bag may now be initialised with a sequence of elements. (#609, kudos to @ra1028)
  3. Non-class types may now conform to ReactiveExtensionProvider. (#636, kudos to @ra1028)

@andersio andersio released this Jan 11, 2018 · 138 commits to master since this release

Assets 2

This is the first release of ReactiveSwift 3.1. It supports Swift 3.2 and Swift 4.0.

Bugfix

  1. Fixed a scenario of downstream interruptions being dropped. (#577, kudos to @andersio)

    Manual interruption of time shifted producers, including delay, observe(on:), throttle, debounce and lazyMap, should discard outstanding events at best effort ASAP.

    But in ReactiveSwift 2.0 to 3.0, the manual interruption is ignored if the upstream producer has terminated. For example:

    // Completed upstream + `delay`.
    SignalProducer.empty
        .delay(10.0, on: QueueScheduler.main)
        .startWithCompleted { print("The producer should have been interrupted!") }
        .dispose()
    
    // Console(t+10): The producer should have been interrupted!

    The expected behavior has now been restored.

    Please note that, since ReactiveSwift 2.0, while the interruption is handled immediately, the interrupted event delivery is not synchronous — it generally respects the closest asynchronous operator applied, and delivers on that scheduler.

  2. Fixed schedule(after:interval:leeway:) being cancelled when the returned Disposable is not retained. (#584, kudos to @jjoelson)

    The issue affects only direct use of QueueScheduler. SignalProducer.timer is not affected.

Addition

  1. SignalProducer.concat now has an overload that accepts an error. (#564, kudos to @nmccann)

Change

  1. Fix some documentation errors (#560, kudos to @ikesyo)

@andersio andersio released this Dec 22, 2017 · 141 commits to master since this release

Assets 2

This is the first release candidate of ReactiveSwift 3.1. It supports Swift 3.2 and Swift 4.0.

Bugfix

  1. Fixed a scenario of downstream interruptions being dropped. (#577, kudos to @andersio)

    Manual interruption of time shifted producers, including delay, observe(on:), throttle, debounce and lazyMap, should discard outstanding events at best effort ASAP.

    But in ReactiveSwift 2.0 to 3.0, the manual interruption is ignored if the upstream producer has terminated. For example:

    // Completed upstream + `delay`.
    SignalProducer.empty
        .delay(10.0, on: QueueScheduler.main)
        .startWithCompleted { print("Value should have been discarded!") }
        .dispose()
    
    // Console(t+10): Value should have been discarded!

    The expected behavior has now been restored.

    Please note that, since ReactiveSwift 2.0, while the interruption is handled immediately, the interrupted event delivery is not synchronous — it generally respects the closest asynchronous operator applied, and delivers on that scheduler.

Addition

  1. SignalProducer.concat now has an overload that accepts an error. (#564, kudos to @nmccann)

Change

  1. Fix some documentation errors (#560, kudos to @ikesyo)

@andersio andersio released this Nov 17, 2017

Assets 2

This is the first release of ReactiveSwift 3.0. It supports Swift 3.2 and Swift 4.0, and requires either Xcode 9 or the Swift 4.0 OSS compiler toolchain.

Breaking Change

  1. Signal now uses Lifetime for resource management. (#404, kudos to @andersio)

    The Signal initialzer now accepts a generator closure that is passed with the input Observer and the Lifetime as its arguments. The original variant accepting a single-argument generator closure is now obselete. This is a source breaking change.

    // New: Add `Disposable`s to the `Lifetime`.
    let candies = Signal<U, E> { (observer: Signal<U, E>.Observer, lifetime: Lifetime) in
       lifetime += trickOrTreat.observe(observer)
    }
    
    // Obsolete: Returning a `Disposable`.
    let candies = Signal { (observer: Signal<U, E>.Observer) -> Disposable? in
       return trickOrTreat.observe(observer)
    }
  2. Unavailable symbols in ReactiveSwift 2.x have been removed. (#551, kudos to @ikesyo)

Bugfix

  1. Workaround an unexpected EGAGIN error being returned by pthread in 32-bit ARM debug builds. (#508)

  2. Fixed a potential integer overflow regarding the leeway computation in SignalProducer.timer. (#506, kudos to @soxjke)

Changes

  1. ReactiveSwift has been migrated to Swift 4.0. (#422, kudos to @andersio)

  2. SignalProducer.startWithSignal now returns the value of the setup closure. (#533, kudos to @Burgestrand)

  3. Disabled code coverage data to allow app submissions with Xcode 9.0 (see Carthage/Carthage#2056, kudos to @NachoSoto)

  4. The SignalProducer internals have undergone a significant refactoring, which bootstraps the effort to reduce the overhead of constant producers and producer compositions. (#487, kudos to @andersio)

Deprecation

  1. Signal.Observer.action has been deprecated. Use Signal.Observer.send instead. (#515)

@andersio andersio released this Oct 30, 2017 · 160 commits to master since this release

Assets 2

This is the first release candidate of ReactiveSwift 3.0. It supports both Swift 3.2 and Swift 4.0.

Bugfix

  1. Fixed a potential integer overflow regarding the leeway computation in SignalProducer.timer. (#506, kudos to @soxjke)
Pre-release

@andersio andersio released this Oct 19, 2017 · 165 commits to master since this release

Assets 2

This is the first alpha release of ReactiveSwift 3.0. It supports Swift 3.2 and Swift 4.0, and requires either Xcode 9 or the Swift 4.0 OSS compiler toolchain.

Breaking Change

  1. Signal now uses Lifetime for resource management. (#404, kudos to @andersio)

    The Signal initialzer now accepts a generator closure that is passed with the input Observer and the Lifetime as its arguments. The original variant accepting a single-argument generator closure is now obselete. This is a source breaking change.

    // New: Add `Disposable`s to the `Lifetime`.
    let candies = Signal<U, E> { (observer: Signal<U, E>.Observer, lifetime: Lifetime) in
       lifetime += trickOrTreat.observe(observer)
    }
    
    // Obsolete: Returning a `Disposable`.
    let candies = Signal { (observer: Signal<U, E>.Observer) -> Disposable? in
       return trickOrTreat.observe(observer)
    }

Bugfix

  1. Workaround an unexpected EGAGIN error being returned by pthread in 32-bit ARM debug builds. (#508)

Changes

  1. ReactiveSwift has been migrated to Swift 4.0. (#422, kudos to @andersio)

  2. SignalProducer.startWithSignal now returns the value of the setup closure. (#533, kudos to @Burgestrand)

  3. Disabled code coverage data to allow app submissions with Xcode 9.0 (see Carthage/Carthage#2056, kudos to @NachoSoto)

  4. The SignalProducer internals have undergone a significant refactoring, which bootstraps the effort to reduce the overhead of constant producers and producer compositions. (#487, kudos to @andersio)

Deprecation

  1. Signal.Observer.action has been deprecated. Use Signal.Observer.send instead. (#515)
Pre-release

@andersio andersio released this Sep 16, 2017 · 196 commits to master since this release

Assets 2

This is the second alpha release of ReactiveSwift 2.1. It targets Swift 3.1, Swift 3.2 and Swift 4.0.

Changes

  1. Disabled code coverage data to allow app submissions with Xcode 9.0 (see Carthage/Carthage#2056, kudos to @NachoSoto)
Pre-release

@andersio andersio released this Sep 15, 2017 · 199 commits to master since this release

Assets 2

This is the first alpha release of ReactiveSwift 2.1. It targets Swift 3.1, Swift 3.2 and Swift 4.0.

Changes

  1. Signal.Observer.action has been deprecated. Use Signal.Observer.send instead. (#515)

  2. Workaround an unexpected EGAGIN error being returned by pthread in 32-bit ARM debug builds. (#508)

  3. The SignalProducer internals have undergone a significant refactoring, which bootstraps the effort to reduce the overhead of constant producers and producer compositions. (#487, kudos to @andersio)