Skip to content

refactor(pm): extract DependencySpec into pm/dep_spec.cppm (PR-R1)#3

Merged
Sunrisepeak merged 1 commit intomainfrom
refactor/pm-r1-dep-spec
May 8, 2026
Merged

refactor(pm): extract DependencySpec into pm/dep_spec.cppm (PR-R1)#3
Sunrisepeak merged 1 commit intomainfrom
refactor/pm-r1-dep-spec

Conversation

@Sunrisepeak
Copy link
Copy Markdown
Member

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.

  • New module mcpp.pm.dep_spec (src/pm/dep_spec.cppm) owns
    DependencySpec and the kDefaultNamespace constant. Pure value
    types only — no parsing, no IO. [dependencies] parsing remains in
    mcpp.manifest for now and moves in PR-R5.
  • New empty placeholder mcpp.pm.index_spec so later PRs can land
    imports against a stable module path while the index-config feature
    arrives.
  • mcpp.manifest keeps mcpp::manifest::DependencySpec and
    mcpp::manifest::kDefaultNamespace resolvable via aliases, so every
    call 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
  • e2e subset: 02 / 09 / 12 / 23 / 25 / 26 / 27 all pass
  • Full CI green

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.
@Sunrisepeak Sunrisepeak merged commit b0154f0 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