This repository has been archived by the owner on Jul 3, 2022. It is now read-only.
Releases: Thomvis/BrightFutures
Releases · Thomvis/BrightFutures
4.0.0-beta.1
BrightFutures 4 is compatible with Swift 2.2 / Xcode 7.3
- [BREAKING]
NoError
has been removed from BrightFutures. Use Result'sNoError
instead. You'll have to addimport Result
in the files where you useNoError
.
3.3.0
3.2.2: Fixing Failures
- [NOTE] Updated to Result 1.0.1, enabling Xcode 7.2 support
- [FIX] Fixed bug in
future.isFailure
that would cause it to returntrue
when the future is not completed (thanks @chunkerchunker)
3.2.0: Slightly Breaking & Better
- [NEW] Upgraded to Result 1.0.0 (thanks @bjpbakker)
- [FIX] Fixed Carthage tvOS compatibility (thanks @angelcasado)
- [FIX] Slightly breaking:
forced()
now returns a non-optional (thanks @jacquesf)
3.1.2: Ready for the Big Screen
This release adds support for tvOS.
3.0.0: BrightFutures, Reimagined for Swift 2
This release is compatible with Swift 2. In order to achieve compatibility and to leverage the new Swift 2 features, numerous breaking changes have been made:
- The 'Box' dependency has been removed. Success values and failure errors are no longer wrapped inside a
Box
. - The best (new) way to create a future is to use one of its initialisers (as opposed to static methods)
- The parameter name (
context:
) should now be omitted when passing an execution context to any function on Future - Many free functions that used to take a Future (e.g.
flatten
,promoteError
,promoteValue
) are now methods on the Future itself (thanks to protocol extensions) - Completion handlers on a future no longer retain that future. If there are no references to a future (meaning that it cannot be completed), it will now be deallocated, regardless of it having completion handlers.
Other enhancements:
- Bitcode support
- A new
delay
method on Future
For more details on how to migrate to BrightFutures 3.0, see the migration guide.
3.0.0.beta.5: Almost there
- Fixes compatibility with Carthage when building with bitcode support
- Adds an easy way to create a non-serial Queue
- Updated Result dependency to 0.6.0-beta.4
v3.0.0-beta.4
- Reverted to BrightFutures 2.0 behavior for completing futures that have already been completed (i.e. using an assert)
- 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.- Adds
delay(interval: NSTimeInterval)
onAsync
, which produces a newAsync
that completes with the original Async after the given delay - Added support for
NSOperationQueue
as anExecutionContext
v3.0.0-beta.3
This release is compatible with Swift 2, Xcode 7 beta 5.
This is a work in progress snapshot of a larger effort to rewrite parts of BrightFutures using Swift 2 features such as error handling and protocol extensions. The tests are still the same and they're all passing. We're keeping an eye on the (syntactical) changes we need to make to the tests and try to keep them reasonable.
- Some free functions have moved to protocol extensions (e.g.
flatten(f)
now isf.flatten()
) success
,failure
andcomplete
now throw an error if the Future was already completed- Static methods used to create Futures (e.g.
Future.failed
) have been replaced with initializers