refactor(pm): move package CLI commands into pm/commands.cppm (PR-R5)#8
Merged
Sunrisepeak merged 1 commit intomainfrom May 8, 2026
Merged
refactor(pm): move package CLI commands into pm/commands.cppm (PR-R5)#8Sunrisepeak merged 1 commit intomainfrom
Sunrisepeak merged 1 commit intomainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Step five of the pm subsystem refactor.
Strictly zero behavior change.
mcpp.pm.commands(src/pm/commands.cppm) hostscmd_add/cmd_remove/cmd_update— bodies copied line-for-line fromcli.cppm's detail namespace.find_manifest_rootis duplicated as a local helper insidemcpp::pm::commands::detailto avoidmcpp.cli↔mcpp.pm.commandscircular import. Future "shared projectutilities" module can collapse the duplicate.
cli.cppmdrops ~280 lines; the dispatch table now binds themcpp::pm::commands::*qualified names.Test plan
mcpp build(worktree)mcpp test— 9/9 unit binaries pass