Skip to content

0.3.0

Compare
Choose a tag to compare
@JensAyton JensAyton released this 06 Apr 08:50
· 124 commits to master since this release
afe23c2

0.3.0 makes many changes from 0.2.0. Where possible, old names and types are available with deprecation attributes; these will soon be removed.

  • Updated threading model:
    • MobiusLoop is now single-threaded
    • MobiusController runs a loop on a single background queue.
    • Fixed several issues around hard-to-avoid assertions in loop teardown.
  • New EffectRouter and EffectHandler replace EffectRouterBuilder (which is deprecated along with several helpers).
  • Effects in First and Next are now an array rather than a set. This doesn’t imply an ordering guarantee, but does mean that effects don’t have to be Hashable.
  • Various things renamed or changed from methods to properties to better conform to Swift API Guidelines and for internal consistency:
    • Initiator is now Initiate, and is only used with MobiusController.
    • MobiusLoop.getMostRecentModel() becomes latestModel.
    • MobiusController.getModel() becomes model.
    • Connectable.InputType and OutputType become Input and Output; Connection.ValueType becomes Value.
  • Update is now a struct. This isn’t leveraged by Mobius itself at the moment, but makes it easier to write transformations on updates in a fluent style.
  • For consistency, MobiusController is created through a makeController() method on Mobius.Builder instead of being initialized with a builder argument.
  • All methods on MobiusLogger now have default do-nothing implementations.
  • ConsoleLogger has been replaced with SimpleLogger, which can take a consumer function to use instead of print.
  • NoEffect and BrokenConnection are deprecated.
  • MobiusHooks.ErrorHandler now returns Never rather than Void.
  • Mobius no longer adds a public extension to NSRecursiveLock.
  • There are more documentation comments than there used to be.
  • Tooling updated to Swift 5.0 and Xcode 11.0.
  • Swift Package Manager is explicitly supported for all Apple platforms; Carthage and CocoaPods are supported for iOS only.