command-line-api
command-line-api copied to clipboard
Reworked pipeline to introduce phases for ordering
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
ResponseSubsystemand made it non-replaceable for now - Running
Teardownmore consistently - Added skeleton
InvocationSubsystemandValidationSubsystem - Made
ValueSubsystema 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.