Skip to content

Convert remaining Fallout.Cli commands to IFalloutCommand dispatch (#392)#476

Draft
ChrisonSimtian wants to merge 4 commits into
Fallout-build:mainfrom
ChrisonSimtian:cli-command-dispatch
Draft

Convert remaining Fallout.Cli commands to IFalloutCommand dispatch (#392)#476
ChrisonSimtian wants to merge 4 commits into
Fallout-build:mainfrom
ChrisonSimtian:cli-command-dispatch

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Second step of the Fallout.Cli command-dispatch migration (#392). Builds on the merged foundation (#448); supersedes fork-only PRs #17#26, which were collapsed into one and re-authored against the current (async/internal) contract.

Converts the remaining legacy Program.X handlers into real IFalloutCommand types and reduces Program to a thin entry point.

What

  • complete, get-configuration, add-package, update, secrets, cake-convert, cake-clean, setup, and the navigation cluster → real command types (ExecuteAsync, DI-injected services)
  • New injectable services: ConfigurationReader, PackageManager, BuildScaffolder, CakeConverter, CliConventions
  • Deletes the DelegateCommand shims + every Program.X.cs partial
  • Specs re-homed to Fallout.Cli.Specs (async); existing specs repointed to the new service homes

Not breaking / no regressions

Derived from main's current handlers, so these are preserved: .slnx setup support, net10.0 target, the _FALLOUT_VERSION_ template token, and the nuke→fallout rebrand. Fallout.Cli.Specs 46/46 green; runtime dispatch verified (all 15 commands resolve via DI).

Notes

  • Not per-command commits: the shared Program registration + config services couple the commands (CakeConvert depends on SetupCommand), so it lands as 4 logical commits.
  • Sync commands wrap in Task.FromResult(...) (as the existing DelegateCommand did); only genuinely async work is truly async.

🤖 Generated with Claude Code

ChrisonSimtian and others added 4 commits July 11, 2026 22:12
Extract Program.Trigger into a real IFalloutCommand (async ExecuteAsync per the merged
foundation contract), register the type directly, and drop the DelegateCommand shim + the
Program.Trigger.cs partial. Test re-homed to Fallout.Cli.Specs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extract the shared logic the converted commands depend on into injectable services:
ConfigurationReader (build-script config parsing), PackageManager (package add/replace),
BuildScaffolder (build scripts/solution wiring, incl. the .slnx writer), CakeConverter
(Cake script conversion), and CliConventions/ToolBanner (banner + script-name helpers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fallout-build#392)

Convert complete, get-configuration, add-package, update, secrets, cake-convert, cake-clean,
setup, and the navigation cluster into real IFalloutCommand types (async ExecuteAsync, DI-injected
services), register them directly, and delete the DelegateCommand shims + every Program.X.cs
partial. Program is now a thin entry point (DI wiring + root resolution). Commands and new CLI
interfaces are internal, matching the merged foundation. Derived from main's current handlers, so
the .slnx setup support, net10.0 target, and nuke->fallout rebrand are preserved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add async specs for the converted commands (Fallout.Cli.Specs/Commands, *Specs naming) plus a
FakeConsolePrompts double and ConfigurationReader specs, and repoint the existing CakeConversion /
UpdateSolutionFileContent specs at their new service homes (CakeConverter, PackageManager,
BuildScaffolder).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisonSimtian ChrisonSimtian added target/2026 Targets the 2026 calendar-version line (current). See ADR-0004. enhancement New feature or request labels Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request target/2026 Targets the 2026 calendar-version line (current). See ADR-0004.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant