Skip to content

refactor(pm): move publish/xpkg_emit.cppm into pm/publisher.cppm (PR-R6)#9

Merged
Sunrisepeak merged 1 commit intomainfrom
refactor/pm-r6-publisher
May 8, 2026
Merged

refactor(pm): move publish/xpkg_emit.cppm into pm/publisher.cppm (PR-R6)#9
Sunrisepeak merged 1 commit intomainfrom
refactor/pm-r6-publisher

Conversation

@Sunrisepeak
Copy link
Copy Markdown
Member

Summary

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

  • mcpp.pm.publisher (src/pm/publisher.cppm) carries the full
    xpkg-emission implementation under the mcpp::pm namespace.
  • Old mcpp.publish.xpkg_emit is now a thin shim. Aliases use
    using-declarations, not inline forwarders, because ReleaseInfo
    lives in mcpp::pm; ADL on a ReleaseInfo argument would otherwise
    see two distinct candidates and fail with "ambiguous overload" in
    test_xpkg_emit.

Test plan

  • mcpp build (worktree)
  • mcpp test — 9/9 unit binaries pass (including test_xpkg_emit)
  • e2e: 02 / 06 (emit_xpkg) / 09 / 12 / 27 all pass
  • Full CI green

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

* New module `mcpp.pm.publisher` (`src/pm/publisher.cppm`) carries
  the full xpkg-emission implementation — `emit_xpkg`,
  `placeholder_release`, `release_tarball_url`, `sha256_of_file`,
  `make_release_tarball`, `make_release_info` — under the
  `mcpp::pm` namespace.
* Old `mcpp.publish.xpkg_emit` (`src/publish/xpkg_emit.cppm`) is now
  a thin shim. Aliases use **using-declarations** (not inline
  forwarders) because `ReleaseInfo` lives in `mcpp::pm`; ADL on a
  `ReleaseInfo` argument would otherwise see two distinct
  candidates (the inline forwarder + the new mcpp::pm function) and
  fail with "ambiguous overload" inside `tests/unit/test_xpkg_emit`.
  The using-declaration introduces the same symbol into both
  namespaces — single overload, ADL stays clean.

Verification:
* `mcpp build` compiles unchanged.
* `mcpp test` — 9/9 unit binaries pass (including the previously-
  ambiguous `test_xpkg_emit`).
* e2e: 02 / 06 (emit_xpkg) / 09 / 12 / 27 all pass.

`src/publish/` will be deleted entirely once `cli.cppm` migrates
to the `mcpp::pm::` qualified names directly.
@Sunrisepeak Sunrisepeak merged commit 44e3626 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