command-line-api icon indicating copy to clipboard operation
command-line-api copied to clipboard

Reworked pipeline to introduce phases for ordering

Open KathleenDollard opened this issue 1 year ago • 0 comments

PipleinePhases handle the ordering of subsystems. The underlying assumptions are:

  • There is a specific order in which subsystems should run
  • Almost all CLI authors, and many extension authors will have a loose grasp on ordering nuances (based on System.CommandLine history):
    • There is a specific order in which subsystems should run
    • Because of this, we want to restrict or eliminate reordering subsystems.
  • Wile rare, folks sometimes need to interact with ordering, and they will be most comfortable with concepts like "before validation" than arbitrary phases, which were also very difficult to name clearly.
    • A driving scenario is that novel subsystems (not variations on existing concepts, but things we dream of or have not even dreamed of) will need to be ordered correctly.

Also in this PR:

  • Added Enabled property to ResponseSubsystem and made it non-replaceable for now
  • Running Teardown more consistently
  • Added skeleton InvocationSubsystem and ValidationSubsystem
  • Made ValueSubsystem a non-replaceable subsystem

Note: I had to set this aside for several weeks and had a code loss git-astrophe that may have resulted in code loss as I picked it back up - so @mhutch and others, if this does not appear to be the design we discussed, I look forward to that discussion.

KathleenDollard avatar Jun 18 '24 00:06 KathleenDollard