- Adds support for Swift 5.6 and Xcode 13.3.
- Adds support for awaiting a Future's value.
- Adds support for @dynamicMemberLookup.
- Adds support for Swift 5.4 and Xcode 12.5. (#216 & #218, thanks MagFer, MultiColourPixel & paiv)
- Adds
Future.init(error: E, delay: DispatchTimeInterval)
(#215, thanks RomanPodymov) - Fixed casing of various global constants. (#176, thanks Sajjon)
- Deprecated
NoValue
in favor ofNever
Adds support for Swift 5 and Xcode 10.2. Previous versions of Swift are no longer supported.
- Migrated from antitypical/Result to the new Result type in the standard library
- Removed
NoError
in favor ofNever
from the standard library
Thanks to kimdv for doing most of the migration work!
- Updates Result dependency to 4.1 compatible versions. (#203 , thanks Jeroenbb94!)
- Fixes an issue related to the threadDictionary on Linux (#204, thanks jgh-!)
Adds support for Swift 4.2 and Xcode 10.
- Upgrade Result dependency to 4.0.
- [FIX] Fixed a typo and incorrect reference in the
andThen
test (https://github.com/Thomvis/BrightFutures/pull/197, thanks https://github.com/robertoaceves!)
Adds support for Swift 4.1 and Xcode 9.3 (tested with beta 4).
- Workaround for SR-7059
Adds support for Swift 4 and Xcode 9
Adds support for Swift 3.1 and Xcode 8.3
Adds support for Swift 3 and Xcode 8
Adds support for Swift 2.3 and Xcode 8 (tested with beta 4)
- [FIX]
AsyncType.delay()
now correctly starts the delay after the AsyncType has completed, which was the intended behavior. This fix can be breaking if you depended on the faulty behavior. (https://github.com/Thomvis/BrightFutures/pull/139, thanks peyton!)
BrightFutures 4.0.0 is compatible with Swift 2.2 and Xcode 7.3.
- [BREAKING]
NoError
has been removed from BrightFutures. - [Breaking]
SequenceType.fold(_:zero:f:)
and methods that use it (such asSequenceType.traverse(_:f:)
andSequenceType.sequence()
) are now slightly more asynchronous: to prevent stack overflows, after a certain number of items, it will perform an asynchronous call. - [FIX] Fixed stack overflow when using
sequence()
ortraverse()
on large sequences.
- Added three new variants of the
future
free function that enables easy wrapping of completionHandler-based API. Thanks @phimage!
Note: some versions are missing here
- The implementation of
mapError
now explicitly usesImmediateExecutionContext
, fixing unnecessary asynchronicity - Adds
delay(interval: NSTimeInterval)
onAsync
, which produces a newAsync
that completes with the original Async after the given delay - All FutureUtils free functions are now functions in extensions of the appropriate types (e.g. SequenceType)
InvalidationToken
instances now have avalidContext
property which is anExecutionContext
that can be passed to any function that accepts anExecutionContext
to make the effect of that function depend on the validity of the token.- Added support for
NSOperationQueue
as anExecutionContext
- Adds an implementation of
flatMap
that allows a function to be passed in immediately. Thanks @nghialv!
This release is compatible with Swift 2. It is a direct port of 2.0, meaning it makes no use of new Swift 2 features yet.
- Removed our homegrown 'ErrorType' with Swift 2's native one
- The 'Box' dependency is gone. Swift 2 removed the need for boxing associated values in enums!
Because antitypical/Result has not yet released a Swift 2 compatible release on CocoaPods, this version of BrightFutures can not yet be built using CocoaPods.
-
Replaced homegrown
Result
andBox
types with Rob Rix' excellent types. -
Futures & Promises are now also parametrizable by their error type, in addition to their value type:
Future<ValueType, ErrorType>
. This allows you to use your own (Swifty) error type, instead ofNSError
! -
Adds
BrightFuturesError
enum, containing all three possible errors that BrightFutures can return -
Renames
asType
toforceType
to indicate that it is a dangerous operation -
Adds missing documentation (jazzy reports 100% documentation coverage!)
-
Adds a lot of tests (test coverage is now at 97%, according to SwiftCov!)
- Updated README to reflect the pre-1.0.0 change from FutureUtils functions to free functions
- The FutureUtils class has been removed in favor of a collection of free functions. This allows for a nicer function type signature (e.g. accepting all sequences instead of just arrays)
Note: The overview for this release is incomplete
- Changed
ExecutionContext
from a protocol to a function type. This allows for better composition. It does mean that a Queue cannot be used directly as anExecutionContext
, instead use thecontext
property (e.g.Queue.main.context
) or thetoContext
function (e.g.toContext(Queue.main)
).
Note: this overview is incomplete
TaskResultValueWrapper
has been renamed to the conventional nameBox
TaskResult
has been renamed to the conventional nameResult
This release marks the state of the project before this changelog was kept up to date.