This file is no longer updated, please visit Releases instead.
2021-11-05
v1.0.0 🎉
- Updates to Workflow Templates by @monishsyed in #100
- Update RenderTester+TestContext.swift by @cbowns in #102
- Remove unused ReactiveSwift imports by @dhavalshreyas in #103
- Combine Worker by @soorinpark in #104
Full Changelog: https://github.com/square/workflow-swift/compare/v1.0.0-rc.1...v1.0.0
2021-08-27
- Bump RxSwift to 6.2 (#99)
2021-04-01
- Switch from deprecated
RxSwiftAPI (#97)
2021-03-29
- Update
RxSwiftdependency to~> 5.1(#96)
2021-03-29
- Updated documentation.
AnyWorkflowConvertiblehelper to ignore output (#90)- Fixes an issue with handling Queued Events (#94)
- [RenderTester] Support assertions which throw (#92)
2020-09-11
- Add convenience
onOutputtransformer forAnyWorkflow(#59) - Remove the APIs that were deprecated in the Workflow 1.0.0 alpha (#62, #63, #64, #65, #66). See the migration guide for more info.
2020-09-02
- Lowering RxSwift version requirement from 5.1.1 to 4.4.0 (#60)
2020-08-26
- Fix RenderTester assert(action:) (#57)
- Introduce 'makeOutputSink' convenience on 'RenderContext' (#55)
2020-07-15
- Enable testing of SignalProducer/Signal/Observable used in Workflows (#46)
- Fix WorkflowRxSwift podsepcs (#45)
- Constrain Worker Rendering type to Void (#44)
- Remove unncessary dependencies (#47)
2020-07-11
- Fixes issues with some
.podspecs. (#43)
2020-07-10
- Mark
asWorkerAPI as unavailable. (#40) - Fixed a bug in
WorkflowTesting, it now catches when multipleWorkflows of the same type + key are used in a render call. (#39)
2020-07-07
- Breaking:
Workers have moved from the coreWorkflowlibrary toWorkflowReactiveSwift. (#12)- You will need to add that as a dependency and import that module in any files with
Workers.
- You will need to add that as a dependency and import that module in any files with
- Breaking:
Workers are now keyed based on type. (workflow/1021)- If you were running multiple
Workers of the same type on arendercall, please use akeywhile running it:MyWorker().running(in: context, key: "key")
- If you were running multiple
SwiftandKotlinlibraries now live in seperate repos.Workers are now built on a more fundamental concept calledSideEffect. (workflow/1021)- Introduce
WorkflowRxSwiftto build aRxSwiftWorker. (#27) - Several APIs have been updated to be consistent. The older APIs have been deprecated and will be removed from the
beta. (#9)MyWorkflow().rendered(with: context)toMyWorkflow().rendered(in: context)context.awaitResult(for: MyWorker())toMyWorker().running(in: context)
- Introduce new
RenderTesterAPI. The older APIs have been deprecated and will be removed from thebeta. (#15) - Allow updating the root Workflow in
ContainerViewController. (#7) - Generic parameters in
ContainerViewControllerwere reordered for consistency. If you were explicitly specifying the generic types when using this view controller you will need to swap them. (#24)
2020-05-20
- Swift-only release; no changes.
- Fix: Added missing libswiftos.dylib to the test target (#1175)
2020-05-12
- Breaking: Simplify
ViewRegistryto act more like a simple map of rendering type toViewFactory. (#1148) - Extracted Compose support into square/workflow-kotlin-compose. (#1147)
- Artifacts for Compose support will be released separately from now on, which allows us to keep them updated more frequently as the Workflow library stabilizes.
- Remove RxJava2 dependency from Workflow Android UI integration. (#1150)
- Fix: Make
workflow-ui-android-coredeclareworkflow-runtimeasapiinstead ofimplementationdependency. (#1144) - Fix: Move
WorkflowFragmentinitialization toonViewStateRestored. (#1133 – thanks @ychescale9!) - Upgrade coroutines library to 1.3.6. (#1151)
- Add os_signpost logs for
render()andWorkflowandWorkerlifecycle. (#1134)
2020-05-11
- Add insecure checksums gradle flag to fix Nexus release. (#1156)
- Kotlin-only release, no changes.
2020-05-04
- Update Compose to dev10. (#1118)
- Remove context.subscribe (#1111)
2020-04-17
- Upgrade kotlinx.serialization now that KAML supports it. (#1018)
- Makes BackStackContainer.update protected, required for customization. (#1088)
- Vend
preferredContentSizethrough theDescribedViewController(#1051) - Add ContainerViewController init with AnyWorkflowConvertable (#1092)
- Provide empty
makeInitialStateandworkflowDidChangewhen State is Void (#1094)
2020-03-27
- Swift-only release. No changes.
- Introduce
SignalWorkerto wrapSignals (#1048)
2020-03-10
- Introduce a view binding function that works with AndroidX ViewBindings. (#985)
- Rename ViewBinding to ViewFactory. (#1009)
- Rename ContainerHints to ViewEnvironment to match Swift. (#1005)
- Fix type parameter for expectWorker accepting Worker instance. (#969)
- Removes ViewRegistry, Introduce ViewControllerDescription. (#974)
- Introduce ViewEnvironment. (#999)
- Fix type parameter for expectWorker accepting Worker instance. (#969)
- Kotlin-only release, no changes.
- Make the context used to start workers configurable for tests. (#940, #943, #950)
- Kotlin-only release, no changes.
- Swift-only release, no changes.
- Seperate
SwiftUIsupport to a different module:WorkflowSwiftUI. (#929)
2020-01-31
- Make all workers run on the
Unconfineddispatcher. (#851) - Paramaterize the return type of
Worker.finished()to make it more convenient to use in tests. (#884) - Improved animation for
BackStackContainer,PanelContainer. (#886) - Target JVM 1.8 bytecode for all modules. (#898)
- Don't call
onPropsChangedunless the old and new props are actually unequal. (#887) - Use KType instead of KClass in TypedWorker. (#908)
- Make verifyAction and verifyActionResult support no processed action. (#909)
- Drastically simplified ModalViewContainer. (#913)
- Pass
acceptOutputfunction toWorkflowNodeconstructor instead of every tick pass. (#916) - Break UI modules into: (#915)
workflow-uicore-commoncore-androidmodal-commonmodal-androidbackstack-commonbackstack-android
- No changes.
2020-01-15
- Allow empty snapshots to be passed into launchWorkflowIn (#881)
- Flag out WorkflowTesting APIs when in Release mode (#872)
2020-01-10
- Adds
ContainerHintstoShowRenderingTag. (#868) - Add an empty
ViewRegistryfactory function. (#870)
- Kotlin-only release, no changes.
2020-01-07
- Breaking: WorkflowAction.invoke is now action. (#862)
- Fixes StatelessWorkflow.action. (#861)
- Kotlin-only release, no changes.
2019-12-20
- Make WorkflowAction covariant on OutputT again. (#837)
- Undo making RenderContext a sink, give it a sink property instead. (#839)
- Kotlin-only release, no changes.
2019-12-18
- Safer
BackStackScreenconstruction. (#809) - Pass
ContainerHintsviasetContentWorkflow. (#808) ViewRegistryis now aContainerHint. (#770)- Remove deprecated
testRenderAPI. (#743)
- Make
lifecyclOrNullpublic. (#747) - Give
Worker.doesSameWorkAsa default implementation that just compares by concrete type. (#746) - Replace
WorkflowAction.MutatorAPI with more ergonomic.Updater(#812, #813) - Give
RenderTester.renderfunction argument a default no-op value. (#828) - Add overload to
RenderTester.expectWorkerfor simple worker comparisons. (#828) - Make
RenderContextitself a Sink. (#835) - Convert
ViewRegistryto an interface. (#832)
- Add variance to StatelessWorkflow type parameters. (#790)
- Make event sinks queued and reusable instead of throw after going stale. (#742)
- Optimize re-rendering child workflows. (#800)
- Add macOS support (#750)
- Add
ContainerViewto enable SwiftUI integration. (#691)
2019-11-18
- Fix RenderTester not allowing output-less expectations to be specified after one with output. (#756)
- Fix RenderTester not checking worker keys. (#755)
- Kotlin-only release, no changes.
2019-11-7
- Restore
testFromState. (#716) - New render testing API for kotlin. (#687)
- Kotlin-only release, no changes.
2019-10-30
- Publish
internal-testing-utilsartifact that is required by two of the other modules. (#708) - Add missing kdoc for
TraceLogger(#705)
- Kotlin-only release, no changes.
2019-10-29
- Add
StatefulWorkflow.workflowAction. (#576) - Remove
runningWorkerUntilFinished. (#589) - Remove key from
TypedWorkerand helpers that use it. (#606, #619) - Never pass an empty snapshot to
initialState. (#556) - Change the return type of
Worker.finishedfromTtoNothing. (#637) - Add an
RxWorkerclass so Workers can be implemented without using experimental Flow APIs. (#650) - Make
RxWorkerandFlowable.asWorkerusePublisherinstead ofFlowable. (#654) - Make it simpler to provide debugging names for workflow actions. (#696)
launchWorkflowInblock now takes aWorkflowSessioninstead of individual parameters. (#612)- Introduce
WorkflowDiagnosticListenerto support various debugging and logging tools. (#628, #634) - Implement chrome trace file generation. (#617)
- Introduce
WorkerSinkfor writing integration tests that involve worker outputs. (#588) - Fix a race in
WorkerTester. (#638) - Make testing infra run double render passes to suss out side effect code in render methods. (#678)
- Make it possible to pass just the snapshot for the root workflow into the test methods. (#681)
- Throw workflow exceptions from
test/testFromStartinstead of leaking to uncaught exception handler. (#686)
- Eliminate
HandlesBack, introduceView.backPressedHandler. (#614) - Introduce
WorkflowViewStub. (#657) - Adds
getRendering,getShowRenderingViewextensions. (#666) - Eliminate
WorkflowRunner.onSaveInstanceState. (#679) - Compile time assurance that
BackStackScreenis not empty. (#688) - Introduce
ContainerHintsfor passing view-only hints aroundLayoutRunners. (#693)
- Upgrade Kotlin to 1.3.50. (#560)
- Upgrade coroutines to 1.3.1 stable. (#561, #590)
- Upgrade a bunch of other dependencies, see the commit history for details.
- Eliminate
ExperimentalWorkflowUi. (#565) - Rename
Worker<T>toWorker<OutputT>. (#570) - Fix "java" being printed instead of class name in Rx2 Reactors. (#607)
- Fix a worker crash introduced by
onReceiveOrClosed. (#630) - Make
onEvent,makeActionSink, andmakeEventSinkinclude what action was lost to when they receive more than one event. (#673)
- Update ReactiveSwift to 6.0.0. (#574 – thanks @lechristian!)
- This also moves everything over to the standard library’s
ResultwithNever(rather thanNoError). As of this change, consumers must use Swift 5.
- This also moves everything over to the standard library’s
- Apply child workflow output as an action in
RenderTester. (#595) - Add
WorkflowUItoPackage.swift. (#690)
2019-8-21
- Rename
onWorkerOutputtorunningWorker(and friends). (#546) - Add Kotlin
Sink,makeActionSink,makeEventSink. (#537) - Rename
LifecycleWorker.onCancelledtoonStopped. (#550) - Create a
Worker.transformoperator. (#533) - Remove all non-test dependencies on Kotlin Reflect. (#551)
- Rename
InputT->PropsT(#549) - Update a bunch of dependency versions.
- Plumb file and line to convenience render tester method (#516)
2019-7-29
- Update to build with Swift 5.
- Allow sinks to be reused across render passes if a sink of the same action type is declared. (#443)
- Support updating the root workflow input on a
WorkflowHost. (#351) - Add support for
RenderTesterto expect child workflows and outputs. (#442)
WorkflowRunnernow delivers single result instead of output stream (#468)- Use single object for
noActioninstead of creating it on every call (#473) - Upgrade AGP to 3.5.0-rc01. (#484)
- Use Java 8 (#492)
2019-7-16
- Added builder functions for creating stateful workflows. (#441)
- Introduce Kotlin Flows:
- Convert the Worker API to use Flow instead of using its own Emitter type. (#435)
- Convert InputT streams from channels to Flows. (#433)
- Add Completable.asWorker() operator. (#423)
- Rename WorkflowAction.noop() to noAction(). (#420)
- Change RenderContext.onEvent return type to be a raw function type. (#387)
- Moves Named.key up to Compatible.compatibilityKey. (#429)
- Replace WorkflowHost with the launchWorkflowIn function. (#447)
- Delete flatMapWorkflow. (#377)
- Allow specifying a different CoroutineDispatcher in the WorkflowRunner. (#379)
- Bump Kotlin to latest version (1.3.41), along with Dokka and detekt. (#451)
- Migrate to AndroidX. (#59, #469 - thanks @charbgr!)
- Bump AGP to latest beta version (3.5.0-beta05). (#427)
- Update coroutines dependency to 1.3.0-M2. (#409)
- Don't throw from runningWorker when the worker finishes. (#456)
- Less hacky lifecycle search in ModalContainer. (#448)
- Fix Worker backpressure (too much buffering). (#446)
- Set up a teardown hook for dialogs. (#432)
- Artifact name changes (#419)
- Add -jvm suffixes to all modules that could be MPP one day.
- Add the -core suffix to the artifact for workflow-ui-core.
- Remove (incorrect) manual implementation of ensureActive. (#378)
- Fix WorkflowPool to work with ConflatedBroadcastChannel. (#475)
- Rename AnyWorkflowAction.identity to
noAction(#444)
2019-6-12
- Breaking change:
BackStackScreenincludes the entire backstack. (#403) - Fixes BackStackContainer config change. (#406)
- Fix snapshots of a non-flat tree being taken too late. (#408)
- Kotlin-only release, no changes.
2019-6-6
- Breaking change:
LayoutRunnerreplacesCoordinator, no moreScenesupport inViewBinding. (#383) - Allows WorkflowLayout to work from any stream of renderings. (#395)
- Kotlin-only release, no changes.
2019-5-30
- Allow specifying a different CoroutineDispatcher in the WorkflowRunner. (#379)
- Kotlin-only release, no changes.
2019-5-29
- Add a Worker.createSideEffect helper for Nothing-type workers. (#366)
- Add a Worker.timer function to create simple delay workers. (#368)
- testRender can now test arbitrary event handlers and automatically calculate initial state. (#372)
- Allow specifying the CoroutineDispatcher used by WorkflowRunnerViewModel. (#375)
Actionsupdate theRenderingsynchronously. (#362, #348)
2019-5-24
- Make RenderTester not require specific Mock* workflows/workers. (#369)
- Breaking change: Public WorkflowLayout, tidier WorkflowRunner, bye WorkflowActivityRunner. (#367)
- Kotlin-only release, no changes.
2019-5-22
- Breaking change: remove the
CoroutineScopeparameter toinitialState, removeonTeardown. (#289) - Breaking change: made
LifecycleWorkermethods non-suspending. (#328) - Removed must nullability restrictions from parameter types. (#334, #352)
- Marked
workflow-ui-coreandworkflow-ui-androidAPIs as experimental. (#345) - Breaking change: removed deprecated
Screenclasses. (#347) - Add experimental support for input from Flow streams. (#280)
- Introduce alternative testing infrastructure to test single render passes. (#349)
- Add
Emitter.emitAllextension to consume RxJava streams from within custom workers. (#354) - Breaking change: simpler / richer
WorkflowActivityRunnerAPI.PickledWorkflowno longer public. (#355, #358) - Breaking change: make the
RenderContextparameter toWorkflow.statelessthe receiver instead. (#357) - Introduces
WorkflowFragment. (#344, #358)
- Add Action and Render testing helpers. (#330)
2019-4-26
- Introduce Workers as the new and only way to subscribe to external stream and future types. (#289, #321, #322, #323, #324)
- Rename WorkflowContext to RenderContext. (#309)
- Fix for stale workflow output handlers being invoked in later render passes. (#314)
WorkflowTesterimprovements:- Give WorkflowTester a sendInput method to update the root workflow-under-test's input. (#315)
- Remove WorkflowTester.with* methods. (#318)
- Make WorkflowTester the receiver of the lambdas to Workflow.test* methods. (#318)
- Rename
composetorenderand update docs. (#301)
2019-4-18
- Fix for WorkflowHost.Factory not using baseContext. (#306)
- Kotlin-only release, no code changes.
2019-4-16
- Rename WorkflowContext.compose to composeChild. #274
- Rename compose and composeChild to render and renderChild. #293
- Throw if WorkflowContext is accessed after compose returns. #273
- Pass the workflow's scope into initialState. #286
- Add the ability to update the input for a WorkflowHost. #282
- Kotlin-only release, no code changes.
2019-4-12
- Don't allow
AnyScreento wrap itself. (#264)
2019-4-10
- Improve type safety by removing AnyScreenViewController as a base type. (#200)
- Replaces AnyScreenViewController with a type erased AnyScreen. This requires the compose method to output either a single typed screen, or explicitly
AnyScreenif it may return multiple different screen types.
- Replaces AnyScreenViewController with a type erased AnyScreen. This requires the compose method to output either a single typed screen, or explicitly
- Use kotlinx-coroutines-android and Dispatchers.Main instead of Rx's Android scheduler. (#252)
- Upgrade okio to 2.2.2.
- Only allocate one StatefulWorkflow per StatelessWorkflow instance.
2019-4-2
- Update Kotlin and coroutines to latest versions. (#254)
- Fixed some broken kdoc links and some warnings. (#232)
- Add teardown hook on
WorkflowContext. (#233) - Rename modules:
- Fix broken Parcellable implementation in ModalContainer. (#245)
- Introduce WorkflowActivityRunner. (#248)
- Kotlin-only release, no changes.
2019-3-28
- Factor out a common parent interface for StatelessWorkflow and Workflow (now StatefulWorkflow). (#213)
- Replace restoreState with a Snapshot param to initialState. (#220)
- Moves StatelessWorkflow, Workflows.kt methods to Workflow. (#226)
- Kotlin-only release, no changes.
2019-3-25
- Workaround #211 by implementing
KTypeourselves.
- Kotlin-only release, no changes.
2019-3-22
- Switch to using expectation from spinning the runloop.
- Update ReactiveSwift to 5.0.0.
- Added Xcode 10.2 support.
- Add convenience extensions for makeSink and awaitResult.
- Add xcode templates.
- Reverts Kotlin back to v1.2.61.
- Make a StatelessWorkflow typealias and a hideState() extension function.
- Fix the exception thrown by
WorkflowTesterwhen an exception is thrown inside test block. - Use explicit
KType+Stringparameters instead of Any for idempotence key for subscriptions. - Make a
EventHandlertype to return frommakeSink, and renamemakeSinktoonEvent.
2019-3-15
- Bumps Kotlin to v1.2.71.
- Kotlin-only release, no changes.
2019-3-12
- Breaking change,
ViewBuilderis nowViewBinder. AddsbuildScene()method. (#57) BackStackEffectallows configuration of transition effects betweenBackStackScreens.ModalContaineradds support forAlertDialogand custom views inDialogwindows.- Sample app consolidated to two modules,
samples/tictactoe/androidandsamples/tictactoe/common. VariousShell*classes in sample renamed toMain*. - Breaking change,
EventHandlingScreeninterface eliminated. It wasn't useful. - Breaking change,
workflow-core,workflow-rx2, andworkflow-testmodules moved to legacy folder, givenlegacy-prefix (module and maven artifact), and code moved tolegacypackage. None of these modules should be used in new code, they will be deleted soon. - Workflows have been completely rewritten and are now almost identical to Swift workflows.
- Initial release.
2019-1-4
- Breaking change, further API refinement of
WorkflowPooland friends. ExtractsWorkflowUpdateandWorkflowPool.Handlefrom the defunctWorkflowHandle. (#114)
2019-1-2
- Breaking improvements to
WorkflowPoolAPI --Delegatinginterface replaced byWorkflowHandlesealed class. (#98) - Deprecates
EventSelectBuilder.onSuccess, replaced byonWorkflowUpdateandonWorkerResult. (#89) - Sample code includes unit test of a composite workflow,
ShellReactorTest, demonstrating how to keep composites decoupled from their components. (#102) - Adds
eventChannelOfhelper for testing. (#85, #95)
2018-12-11
- Improvements to
switchMapState:- Fix:
switchMapStatenow is actually a switch map, was previously behaving like a concat map. (#69, #71) - Introduced variation that takes a lambda that returns an RxJava2
Observable, forworkflow-rx2consumers. (#53)
- Fix:
- Factored the channel and coroutine management out of
ReactorWorkflowinto a more pureworkflowbuilder function. (d0aef29) - Fix: Race condition in
WorkflowPool. (#45) makeIdfunctions renamed tomakeWorkflowId.ViewStackScreenrenamed toStackScreen.- Sample of using
AlertDialogwithViewBuilder. - Improved kdoc and comments on use of
Unconfineddispatcher. (#74, #81) - Workflow coroutines are now given names by default.
- Remove some unused code. (#44, #77)
2018-12-04
- New:
ViewBuilder– Android UI integration. - New:
Worker– Helper to run async tasks viaWorkflowPool. - Eliminated most of the boilerplate required by
WorkflowPool.Type. It's now a concrete class. - Renamed
ComposedReactortoReactor, eliminating the old, deprecatedReactorinterface.
2018-11-28
ReactorWorkflow,WorkflowPool, and related types have been ported to coroutines and moved to the workflow-core module.
2018-11-22
- Organize everything into
com.squareup.workflow*packages.