Remove ReactiveSwift from Workflow public interface #360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a breaking change to Workflow that removes ReactiveSwift from the public interface of Workflow and Workflow UI.
There are 3 changes:
WorkflowHost
rendering
is now a Combine publisher that has avalue
property for the current rendering. In searching the register code base there were very few places we were using aSignal
/SignalProducer
from therendering
property. The plan would be to change those consumers to usesink
. Thevalue
property is the same so all references torendering.value
will work.WorkflowHost
output
has been renamed tooutputPublisher
. It is now a CombinePublisher
that can be used to subscribe to Workflow output. Per Andrew's suggestion I added a new protocolWorkflowOutputPubisher
that exposes theoutputPublisher
. Theoutput
property is used in a lot of places in register. To fix those places I added an extension onWorkflowOutputPubisher
in WorkflowReactiveSwift that re-exposesoutput
as aSignal
. All the places that useoutput
will just need to import WorkflowReactiveSwift and they will continue to work.WorkflowHostingController
in WorkflowUI now implementsWorkflowOutputPublisher
. Consumers usingoutput
will just need to import WorkflowReactiveSwift to continue to work.Note: Even though this removes ReactiveSwift as a dependency from the Workflow and WorkflowUI targets the Workflow Package has to continue to have ReactiveSwift as a dependency since it's used by WorkflowReactiveSwift. But because register uses bazel if you import Workflow/WorkflowUI in your module it does not import (directly or transitively) ReactiveSwift.
Checklist