refactor(pm): extract DependencySpec into pm/dep_spec.cppm (PR-R1)#3
Merged
Sunrisepeak merged 1 commit intomainfrom May 8, 2026
Merged
refactor(pm): extract DependencySpec into pm/dep_spec.cppm (PR-R1)#3Sunrisepeak merged 1 commit intomainfrom
Sunrisepeak merged 1 commit intomainfrom
Conversation
First step of the package-management subsystem refactor described in `.agents/docs/2026-05-08-pm-subsystem-architecture.md`. Strictly zero behavior change — the dependency data model just moves to its new home. * New module `mcpp.pm.dep_spec` (`src/pm/dep_spec.cppm`) owns the `DependencySpec` struct and the `kDefaultNamespace` constant. Pure value types only — no parsing, no IO. The `[dependencies]` / `[dev-dependencies]` parsing remains in `mcpp.manifest` for now and will move in a later refactor PR. * New empty placeholder module `mcpp.pm.index_spec` (`src/pm/index_spec.cppm`) so subsequent PRs can land their imports against a stable module path while the index-config implementation arrives. * `mcpp.manifest` keeps `mcpp::manifest::DependencySpec` and `mcpp::manifest::kDefaultNamespace` resolvable via aliases, so all existing call sites (cli.cppm, fetcher.cppm, ...) compile unchanged. These aliases will be removed once callers are migrated to the `mcpp::pm::` qualified names. Verification: * `mcpp build` compiles unchanged. * `mcpp test` — 9/9 unit binaries pass. * Local e2e subset (02 / 09 / 12 / 23 / 25 / 26 / 27) all pass; full suite expected to be unchanged given strict zero-behavior-change.
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
First of seven refactor PRs described in
.agents/docs/2026-05-08-pm-subsystem-architecture.md.Strictly zero behavior change — the dependency data model just moves
to its new home.
mcpp.pm.dep_spec(src/pm/dep_spec.cppm) ownsDependencySpecand thekDefaultNamespaceconstant. Pure valuetypes only — no parsing, no IO.
[dependencies]parsing remains inmcpp.manifestfor now and moves in PR-R5.mcpp.pm.index_specso later PRs can landimports against a stable module path while the index-config feature
arrives.
mcpp.manifestkeepsmcpp::manifest::DependencySpecandmcpp::manifest::kDefaultNamespaceresolvable via aliases, so everycall site compiles unchanged. The aliases will be removed in a later
PR once callers are migrated to
mcpp::pm::directly.Test plan
mcpp build(worktree)mcpp test— 9/9 unit binaries pass