Skip to content

refactor(pm): move package CLI commands into pm/commands.cppm (PR-R5)#8

Merged
Sunrisepeak merged 1 commit intomainfrom
refactor/pm-r5-commands
May 8, 2026
Merged

refactor(pm): move package CLI commands into pm/commands.cppm (PR-R5)#8
Sunrisepeak merged 1 commit intomainfrom
refactor/pm-r5-commands

Conversation

@Sunrisepeak
Copy link
Copy Markdown
Member

Summary

Step five of the pm subsystem refactor.
Strictly zero behavior change.

  • mcpp.pm.commands (src/pm/commands.cppm) hosts cmd_add /
    cmd_remove / cmd_update — bodies copied line-for-line from
    cli.cppm's detail namespace.
  • find_manifest_root is duplicated as a local helper inside
    mcpp::pm::commands::detail to avoid mcpp.cli
    mcpp.pm.commands circular import. Future "shared project
    utilities" module can collapse the duplicate.
  • cli.cppm drops ~280 lines; the dispatch table now binds the
    mcpp::pm::commands::* qualified names.

Test plan

  • mcpp build (worktree)
  • mcpp test — 9/9 unit binaries pass
  • e2e: 02 / 09 / 12 / 23 / 27 (12 and 23 specifically exercise the moved commands)
  • Full CI green

Step five of the package-management subsystem refactor (see
`.agents/docs/2026-05-08-pm-subsystem-architecture.md`). Strictly zero
behavior change.

* New module `mcpp.pm.commands` (`src/pm/commands.cppm`) hosts the
  three package-management CLI commands previously in `cli.cppm`'s
  detail namespace: `cmd_add`, `cmd_remove`, `cmd_update`. Bodies are
  identical line-for-line.
* `find_manifest_root` is duplicated as a local helper in
  `mcpp::pm::commands::detail` to avoid a circular `mcpp.cli` ↔
  `mcpp.pm.commands` dependency. A future "shared project utilities"
  module can collapse the duplicate; tracked.
* `cli.cppm` drops the three implementations (~280 lines) and the
  command dispatch table now binds `mcpp::pm::commands::cmd_add`,
  `::cmd_remove`, `::cmd_update`.

Verification:
* `mcpp build` compiles unchanged.
* `mcpp test` — 9/9 unit binaries pass.
* e2e subset (02 / 09 / 12 / 23 / 27) all pass — 12 and 23 specifically
  exercise the moved commands.
@Sunrisepeak Sunrisepeak merged commit d97ab2f into main May 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant