- Bugfix:
output_with_outer_ctx: :instance_method
no longer breaks.
- As
Activity::Introspect::TaskMap
got removed, useActivity::Introspect.Nodes(activity)
for introspecting. See https://trailblazer.to/2.1/docs/activity#activity-internals-introspection-api
- Extract
normalizer/extension.rb
to implementExtension() => myext
- Extract
normalizer/inherit.rb
to implementinherit: true
. - Extract
normalizer/output_tuples.rb
which represents code for the Wiring API. - Connectors (
Track()
,Id()
andEnd()
) now contain the logic that returns the search builder. This used to sit in#normalize_connections_from_dsl
. - What used to be the
"path.outputs"
step is now a separate, nested pipeline named"activity.default_outputs"
. See https://trailblazer.to/2.1/docs/internals#internals-wiring-api-outputs-defaulting Basically, The default step's outputs are set in that separate pipeline under"activity.default_outputs"
. - Rename
"path.connections"
to"path.step.add_success_connector"
for consistency. - Move
Railway::DSL::NormalizerForPass
toRailway::DSL::Pass::Normalizer
(same forFail
). - Move
FastTrack::DSL::NormalizerForPass
toFastTrack::DSL::Pass::Normalizer
(same forFail
). - Remove
"activity.normalize_outputs_from_dsl"
as this all happens in#compile_wirings
now.
-
Deprecate
Path(end_id:, end_task:)
options in favor ofPath(terminus: :semantic)
. -
FastTrack
outputs for non-Subprocess()
are only added whenfast_track: true
is set. As a result, this will throw an exceptionNo
pass_fastoutput found for :find_model
.step :find_model, Output(:pass_fast) # throws "no output" exception.
and needs to be changed to
step :find_model, fast_track: true, Output(:pass_fast)
-
Fixed a bug where
Subprocess(Path)
would accidentially add a:failure
connection. As a result, this doesn't work anymorestep Subprocess(Path), Output(:failure) => ...
-
Allow inheriting of
:fail_fast
,:pass_fast
and:fast_track
. -
The
:outputs
option for#step
is now a private concept. When passed explicitely to the normalizer (as it happens withSubprocess()
) it's no longer extended or defaulted. -
Strategy.End()
now returns anOutputTuples::End
instance. UseActivity.End()
for the original behavior. -
Removed the
:connections
option in favor of simply using output tuples for setting connections. We also don't inherit:connections
anymore, but the output tuples. -
Removed the
VariableMapping::Inherit
module as we can use generic inheritance logic. -
Finally add the
Extension() => my_ext
option to painlessly add extensions. This means you don't have to manually merge:extensions
anymore. -
Extensions are now properly inherited (if
generic?
is false) using the universal inheritance mechanism. -
Strategy.invoke
now passes on keyword arguments, too. -
A terminus step no longer maintains any wirings (as per
trailblazer-activity-0.16.0
), resulting in a terminusSequence
row as follows.[ :success, implementing::Success, [], # no outputs anymore! {id: "End.success", stop_event: true, semantic: :success}, # instead, {:semantic} is passed as a data option. ]
-
Remove
Search::Noop
as an empty wirings array inSequence
are allowed now.
- When using
step ..., inherit: true, replace: :find_model
you can now omit:id
. The ID from:replace
is used automatically in that case. - Deprecate
:override
option for#step
. - Simplify
inherit: [:variable_mapping]
by recording the:in_filters
and:out_filters
variables instead of the compiled pipelines. This fixes #61. - Introduce
#patch
to simplify modifying nested activities. Instead ofSubprocess(<activity>, patch: ...)
you can use the dedicated DSL function.
-
Use
trailblazer-activity
0.15.0. -
Remove
Path::DSL.OptionsForSequenceBuilder
and move concrete code toPath::DSL.options_for_sequence_build
which returns a set:- default termini instructions for the concrete strategy
- options specific for this strategy subclass.
Everything else, such as merging user options, computing and adding termini, etc, now happens in
Strategy::DSL.OptionsForSequenceBuilder
. -
Adding
Subprocess(Create, strict: true)
to wire all outputs ofCreate
automatically. Each output will be wired to its same named Track(semantic). -
Adding
Strategy(termini: )
-
For
output:
in combination with:output_with_outer_ctx
, deprecate the second positional argument and make it the:outer_ctx
keyword argument instead. -
Introduce
Linear.Patch
as the public entry point for patching activities. -
Remove
Runtime.initial_aggregate
step for the input and output pipelines which results in slightly better runtime performance and less code.
- Simplify the architecture in
VariableMapping
, filters are now added directly into thePipeline
. Performance increase from 17k to 25k from 1.0.0 to this version. - Introduce
Inject(:variable)
to supersede the version receiving a big mapping hash. - Add
Inject(:variable, override: true)
to always write a variable to ctx, regardless of its presence. - Fix a bug where
Inject()
would overrideIn()
filters even though the latter was added latest. This is fixed by treating both filter types equally and in the order they were added by the user (and the macro).
-
Introduce composable input/output filters with
In()
,Out()
andInject()
. # FIXME: add link -
We no longer store arbitrary variables from
#step
calls in the sequence row'sdata
field. Use theDataVariable
helper to mark variables for storage indata
.step :find_model, model_class: Song, Trailblazer::Activity::DSL::Linear::Helper.DataVariable() => :model_class
-
Add
Normalizer.extend!
to add steps to a particular normalizer. # FIXME: add link -
Add
Strategy.terminus
to add termini. # FIXME: add link -
The
Sequence
instance is now readable via#to_h
:Strategy.to_h[:sequence]
. -
In Normalizer, the
path.wirings
step is now namedactivity.wirings
.
- DSL logic: move as much as possible into the normalizer as it's much easier to understand and follow (and debug).
- Each DSL method now directly invokes a normalizer pipeline that processes the user options and produces an ADDS structure.
- We now need
Sequence::Row
instances inSequence
to adhere to the Adds specification. - Rename
Linear::State
toLinear::Sequence::Builder
. This is now a stateless function, only. Sequence::Builder.() - @state ?
- Remove
Strategy@activity
instance variable and move it to@state[:activity]
. - Much better file structuring.
- Use
Trailblazer::Declarative::State
to maintain sequence and other fields. This makes inheritance consistent. - Make
Strategy
a class. It makes constant management much simpler to understand. Linear.end_id
now accepts keyword arguments (mainly,:semantic
).Strategy.apply_step_on_state!
is now an immutableSequence::Builder.update_sequence_for
.- The
Railway.Path()
helper returns aDSL::PathBranch
non-symbol that is then picked up and processed by the normalizer (exactly how we do it withIn()
,Track()
etc.). Branching implementation is handled inhelper/path.rb
. - Remove
State.update_options
. Use@state.update!
. - Remove
Helper.normalize
. - Remove
Linear::DSL.insert_task
. The canonical way to add steps is using the ADDS interface going through a normalizer. That's why there's a normalizer forend
(or "terminus") now for consistency. - Remove
Helper::ClassMethods
,Helper
is now the namespace to mix in your own functions (and ours, likeOutput()
). - Introduce
Helper::Constants
for namespaced macros such asPolicy::Pundit()
.
- Rename
Linear::State::Normalizer
toLinear::Normalizer::Normalizers
as it represents a container for normalizers. - Move
Linear::Insert
toActivity::Adds::Insert
in thetrailblazer-activity
gem. - Move
Linear::Search
toLinear::Sequence::Search
andLinear::Compiler
toLinear::Sequence::Compiler
. TaskWrap::Pipeline.prepend
is nowLinear::Normalizer.prepend_to
. To use the:replace
option you can useLinear::Normalizer.replace
.- Move
Sequence::IndexError
toActivity::Adds::IndexError
in thetrailblazer-activity
gem. RemoveIndexError#step_id
. - Move DSL structures like
OutputSemantic
toLinear
namespace.
- Introduce
:inject
option to pass-through injected variables and to default input variables. - Remove
VariableMapping::Input::Scoped
as we're now using a separatePipeline
for input filtering. - Massively simplify (and accelerate!) the
Normalizer
layer by usingTaskWrap::Pipeline
instead ofActivity::Path
. Note that you can alter a normalizer by using theTaskWrap::Pipeline
API now.
- Limit
trailblazer-activity
dependency to< 0.13.0
.
- Don't allow duplicate activities in Sequence (#47) 👻
- {:inherit} will only inherit the wirings supported in child activity (#48)
- Updrading
trailblazer-activity
to use shinytrailblazer-option
.
- Support for Ruby 3.0.
- Retain custom wirings within subprocess while patching.
- Allow DSL helpers such as
End()
inPath()
. - Introduce
Path(..., before: )
option to insert all path member steps before a certain element. - Allow
Path(..., connect_to: Track(..))
.
- Fix for registering
PassFast
&FailFast
ends inFastTrack
to fix circuit interface callables which emits those signals.
- Updrading
trailblazer-activity
version to utilise newtrailblazer-context
🥁
- Fixes in circuit interface normalization when given task is a {Symbol}, consider additional {task} options (like {id}) and assign {task} symbol as an {id}.
- Fix circuit interface callable to make
step task: :instance_method
use circuit signature.
- The
Path()
helper, when used with:end_task
will now automatically append the end task (or terminus) toEnd.success
. It used to be placed straight after the last path's element, which made it hard to later insert more steps into that very path.
- Add
:inherit
option sostep
can override an existing step while inheriting the original:extensions
and:connections
(which are theOutputs
). This is great to customize "template" activities. - Add
Track(:color, wrap_around: true)
option andSearch::WrapAround
so you can find a certain track color (or the beginning of a Path) even when the path was positioned before the actual step in theSequence
. Note that this feature is still experimental and might get removed.
Did you mean ?
suggestions on Linear::Sequence::IndexError.- Introduce
Linear::Helper
module for strategy extensions in third-party gems. - Convenient way to patch Subprocess itself using
patch
option. - Allow multiple
Path()
macro per step. - Small fix for defining instance methods as steps using circuit interface.
- Added
@fields
toLinear::State
to save arbitrary data on the activity/strategy level.
- Patching now requires the
:patch
option forSubprocess
.
- Add a minimal API for patching nested activities. This allows customizing deeply-nested activities without changing the original.
- Add
Strategy::invoke
which is a short-cut toTaskWrap.invoke
. It's available as class method in all three strategies.
- Fix requiring
trailblazer/activity.rb
.
- Update to
activity-0.9.1
andcontext-0.2.0
.
- Update to
activity-0.9.0
.
- Fix
:extensions
merging that would override:input
and:output
if the:extensions
option was given via the DSL.
- Fix
Linear
namespacing andrequire
s.
- Add
:connect_to
option toPath()
to allow re-joining a branched activity.
- Use
activity-0.8.3
.
- Fix
:override
in combo with a missing:id
and inheritance by moving the overriding after id generation.
- Provide default
:input
and:output
if one of them is missing.
- Simplify
:override
handling by moving it to a later position.
- In
Strategy#to_h
, now provide a new member:activity
, which is the actualActivity
wrapped by the Path (or whatever) strategy.
- Raise when a step has a duplicate, already existing
:id
but is not a:replace
.
- This code is extracted, refactored and heavy-metaly simplified from the original
trailblazer-activity
gem.