Releases: bignerdranch/Deferred
v4.1.0: Weird Amorphous Blob of Chicken
Deferred 4.1 improves compatibility with Apple's 2019 tools and releases.
This release is compatible with Swift 4.2, 5.0, and 5.1 on Apple platforms and Linux.
- Bumps Swift version to 4.1, removing remaining use of unofficial Swift annotations for binary resilience.
- Improves compatibility with Swift Package Manager in Xcode 11.
v4.0: Fire-Hose Drinking
Deferred 4.0 is easier-to-use and faster than ever before.
This release is compatible with Swift 4.1, 4.2, and 5.0 on Apple platforms and Linux. This will be the last release to support Swift 4.1.
As always, the latest documentation is available here.
- Deferred optimizes for and requires Swift 4.1 or better, including Swift 5.0.
Deferred<Value>
uses up to 70% lower memory and is up to 80% faster. (#229)Task<Success>
and its related types have been redesigned to address common pain points.Task.Result
aligns with the suite of methods and naming from SE-0235, the Swift 5 Result type.- The functionality of
Task<Success>
(map(upon:transform:)
,andThen(upon:start:)
, and so on) are conditionally available onFuture
andDeferred
. - Automatic progress calculation for
Task<Success>
on macOS, iOS, tvOS, and watchOS have been revamped. This is ideal for, and now works better with,URLSessionTask
. - The bare
Task()
is renamedTask.never
. Task(upon:flags:onCancel:execute:)
is renamedTask.async(upon:flags:onCancel:execute:)
.Task.repeat(upon:count:continuingIf:to:)
can be used to simply re-attempt work if it fails.Collection.allSucceeded()
returns a combined array of all successes as its success value.
Future<Value>
benefits from changes toTask<Success>
andDeferred<Value>
.- Implementing a custom
Future
requires fewer method implementations. Future()
is renamedFuture.never
.Future.async(upon:flags:execute:)
can be used to capture the result of asynchronous work.Future
andDeferred
conditionally haveinit(success:)
andinit(failure:)
, instead of requiringinit(value: .success(...))
.
- Implementing a custom
Protected<Value>
andTaskResult<Value>
gain additional optimizations when Deferred is imported as a module.- Improvements to debugging, reflection, and playground support.
v4.0 Candidate 1: An Inexplicable Confidence
Since 4.0 beta 4:
- Fix all warnings under Swift 5.0
- Address interactions with Swift 5.0 exclusivity checking
v4.0 Beta 4: A Flock of Beards
Since 4.0 beta 3:
- Upgrading from Deferred 3 is substantially easier, with compiler fix-its to guide any syntax changes. Issues you may have seen around
Task<Success>.Result
andPreferredExecutor
should no longer require any changes. (#272, #273, #276) - Aligns
Task<Success>
andTask<Success>.Result
with the conventions ofResult
in Swift 5 (SE-0235). For example, the more verboseSuccessValue
,FailureValue
, andextract()
are more succinct asSuccess
,Failure
, andget()
. (#274)
v4.0 Beta 3: Chekhov’s Developer
Since 4.0 beta 2:
- The percent calculations for
Task
on macOS, iOS, watchOS, and tvOS have been revamped. Explicitly creatingProgress
duringmap
or returningProgress
fromandThen
will count more than ones synthesized automatically. This ideal for, and now works better with,URLSessionTask
. (#230, #259, #260, #265, #267, #269). - Various minor cleanups to the generation of docs. (Available here.)
- Sets the Swift version in CocoaPods to inhibit Swift 4.2 warnings. (#261, #262)
- Rewritten and expanded documentation for
Task
. (#266)
v4.0 Beta 2: Hyperphantastic
v4.0 Beta 1: Architecture Rap Battle
Deferred 4.0 brings the latest and greatest of Swift to Deferred, and is optimized to be faster and easier-to-use than ever before.
- Deferred supports and requires Swift 4.1 or better. (#200, #201, #222, #237, #250, #251)
Deferred<Value>
uses up to 70% lower memory and is up to 80% faster. (#229)Task<SuccessValue>
and its related types have been redesigned to address common pain points. (#243)Collection.allSucceeded()
returns a combined array of all successes as its success value. (#217)TaskResult<Value>
provides common-casemap(_:)
andflatMap(_:)
methods. (#244)Task.fallback(upon:to:)
canthrow
from within its handler. (#245, #255)Task()
is renamedTask.never
. (#247)Task(upon:flags:onCancel:execute:)
is renamedTask.async(upon:flags:onCancel:execute:)
. (#248)- The functionality of
Task<SuccessValue>
(map(upon:transform:)
,andThen(upon:start:)
,recover(upon:substituting:)
fallback(upon:to:)
, and so on) are conditionally available onFuture
andDeferred
. (#253) Task<SuccessValue>
convenience initializers are more aligned with the Swift API Design Guidelines. (#254)Task.repeat(upon:count:continuingIf:to:)
can be used to simply re-attempt work if it fails. (#255)
Future<Value>
and its related types benefits from changes toTask<SuccessValue>
andDeferred<Value>
.- Implementing a custom
Future
requires fewer method implementations. (#215, #216) Future()
is renamedFuture.never
. (#247)Future.async(upon:flags:execute:)
can be used to capture the result of asynchronous work. (#248)Future
andDeferred
conditionally haveinit(success:)
andinit(failure:)
, instead of requiringinit(value: .success(...))
. (#254)
- Implementing a custom
- Improvements to debugging, reflection, and playgrounds. (#202, #212, #214, #223)
Protected<Value>
andTaskResult<Value>
are annotated for binary resilience in Swift. Their use across module boundaries should be much faster. (#226, #243)
v3.3.2: World Wide Developer Contention
v3.3.1: The Pod Keeps Rolling On
v3.3.0: It Just Happened That Way
- Convenience initializer to create Task from future that cannot fail (#195)
- Quiets project warnings under Xcode 9.3 (#197)
Due to a cosmic accident, this release also supports Swift 3 syntax. The next planned release shall not.
This release will be submitted to the Swift Source Compatibility Suite for Swift 3.x compatibility.