refactor(pm): move publish/xpkg_emit.cppm into pm/publisher.cppm (PR-R6)#9
Merged
Sunrisepeak merged 1 commit intomainfrom May 8, 2026
Merged
refactor(pm): move publish/xpkg_emit.cppm into pm/publisher.cppm (PR-R6)#9Sunrisepeak merged 1 commit intomainfrom
Sunrisepeak merged 1 commit intomainfrom
Conversation
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.
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 six of the pm subsystem refactor.
Strictly zero behavior change.
mcpp.pm.publisher(src/pm/publisher.cppm) carries the fullxpkg-emission implementation under the
mcpp::pmnamespace.mcpp.publish.xpkg_emitis now a thin shim. Aliases useusing-declarations, not inline forwarders, because
ReleaseInfolives in
mcpp::pm; ADL on aReleaseInfoargument would otherwisesee two distinct candidates and fail with "ambiguous overload" in
test_xpkg_emit.Test plan
mcpp build(worktree)mcpp test— 9/9 unit binaries pass (includingtest_xpkg_emit)