Skip to content
This repository has been archived by the owner on Jul 3, 2022. It is now read-only.

3.0.0: BrightFutures, Reimagined for Swift 2

Compare
Choose a tag to compare
@Thomvis Thomvis released this 17 Oct 11:38
· 259 commits to master since this release

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.