Closed azriel91 closed 1 year ago
Design / implementation issue:
ApplyCmd
wants to call StatesDiscoverCmd::current
ApplyCmd
, and executing concurrently requires an intemediate outcomes rx, which is essentially re-implementing CmdBase
.StatesDiscoverCmd
takes in &mut CmdCtx
.StatesDiscoverCmd
needs immutable references to the flow and parameter specs.CmdCtx
and SingleProfileSingleFlowView
contain &mut Output
, and &mut CmdProgressTracker
.&mut Output
and &mut CmdProgressTracker
to set up progress rendering.CmdCtx
, so that fn_exec
can take in the *View
and progress and outcome Sender
s, and this view can be passed to sub commands.So, we should split Output
and CmdProgressTracker
out of the view into ScopeViewAndOutput
.
Currently:
EnsureCmd
andCleanCmd
delegate toApplyCmd
.ApplyCmd
andStatesDiscoverCmd
both collect outcomes to surface errors as a whole.What we would like for all commands:
*Cmd
invocations share one progress output.Use cases:
EnsureCmd
:Forward iteration through each item.
Calls
state_current
,apply_check
,apply_exec
in sequence.CleanCmd
Forward iteration through each item.
Calls
try_state_current
.Reverse iteration through each item.
Calls
apply_check
,apply_exec
in sequence.StatesDiscoverCmd
:Forward iteration through each item.
Calls
try_state_current
/try_state_desired
.