Skip to content

Commit b5be639

Browse files
committed
polish(cli,pack): the help said half of what pack does, and two dead includes
`mcpp pack` routes on `[targets.<n>].kind`, so "bundle into a self-contained archive" describes only the program half. Both help lines now name both shapes — the one-line help is where a reader finds out that a library target produces something different, and it was the one place that did not say so. Also drops the global module fragments from mcpp.pack.route and mcpp.pack.library_pipeline: both carried `#include <cstdio>` and neither uses it.
1 parent dfa5822 commit b5be639

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/cli.cppm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void print_usage() {
6363
std::println(" mcpp update [pkg] Re-resolve deps and rewrite mcpp.lock");
6464
std::println(" mcpp search <keyword> Search packages in registries");
6565
std::println(" mcpp publish [--dry-run] Publish package to default registry");
66-
std::println(" mcpp pack [--mode <m>] Build + bundle an archive (m: system|vendored|self-contained|static)");
66+
std::println(" mcpp pack [target] Build + package (program: bundle; library: interface + binaries)");
6767
std::println(" mcpp emit xpkg [-V VER] [-o FILE] Generate xpkg Lua entry");
6868
std::println(" mcpp xpkg parse <file.lua> [--json] Validate an xpkg descriptor (resolver grammar)");
6969
std::println("");
@@ -405,7 +405,12 @@ int run(int argc, char** argv) {
405405
// than a plain directory" — WHICH archive follows the artifact,
406406
// because a .tar.gz full of DLLs is a package most Windows users
407407
// cannot open without installing something first.
408-
.description("Build + bundle into a self-contained archive")
408+
// Says both shapes, because `[targets.<n>].kind` picks between them
409+
// and the one-line help is where a reader finds that out. "Bundle
410+
// into a self-contained archive" described only the program case,
411+
// which is now half of what this command does.
412+
.description("Build + package: a program becomes a self-contained "
413+
"bundle, a library an interface + prebuilt binaries")
409414
// NB: a target NAME from [targets.*], not a triple — the same
410415
// split `mcpp run [target]` has. Its `kind` decides what is
411416
// packed, so there is no --lib and no --artifact: a program

src/pack/library_pipeline.cppm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
//
1515
// Design: .agents/docs/2026-08-17-library-distribution-design.md §2.
1616

17-
module;
18-
#include <cstdio>
19-
2017
export module mcpp.pack.library_pipeline;
2118

2219
import std;

src/pack/route.cppm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
// decision ahead of the build: `mcpp pack nosuch` should say so in
1212
// milliseconds, not after compiling the project.
1313

14-
module;
15-
#include <cstdio>
16-
1714
export module mcpp.pack.route;
1815

1916
import std;

0 commit comments

Comments
 (0)