Add package descriptor for CLI11 library - #169
Merged
Merged
Conversation
This file provides a package descriptor for the CLI11 library, detailing its specifications, dependencies, and source information.
描述符原样是构建不了的:`mcpp` 段里的路径都是相对 verdir 的 glob,
`include_dirs = { "include" }` 少了吸收 `CLI11-2.7.2/` wrap 层的前导 `*`,
消费者的 `#include <CLI/CLI.hpp>` 落不到任何目录 —— 改成 `*/include`。
`language` 跟仓内其余 61 个描述符一起用 c++23(它只作用于本包那个 anchor TU,
CLI11 自身只要 C++11,消费者按自己声明的标准编头文件)。
CN 那两个键原本复制的是 GLOBAL 的 github 地址,lint(check_mirror_urls.lua)
要求 CN 必须在 gitcode mcpp-res 之下,照原样是红的。现建 mcpp-res/cli11 并
发布 2.7.2:CN http=200,与 GLOBAL 字节一致(sha256 46eef310…)。
成员 tests/examples/cli11 断言一次完整 parse(取值/默认值/flag/多值/子命令)
与两条失败路径(未声明选项抛 ParseError、Range 越界抛 ValidationError),
外加 CLI11_VERSION 与包自身的 anchor 符号 —— header-only 包的 lib 里就这一个
TU,引用它才能证明包真的被编译并链接,而不是只有头文件被 include。
本地(CI 同版本 mcpp 2026.8.6.1、冷启动)`mcpp test -p cli11` 通过,
两个 obj:parse.o 与 compat_CLI11/mcpp_generated/cli11_anchor.o。
lint 全套(含 mcpp xpkg parse)本地复现通过。
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.
This file provides a package descriptor for the CLI11 library, detailing its specifications, dependencies, and source information.
Maintainer follow-up (c9d3cac) — 补齐收录流程剩下的部分,并修掉两处会让它构建不了 / lint 红的地方。设计文档:
.agents/docs/2026-08-06-add-cli11-plan.md。修正
include_dirs = { "include" }→{ "*/include" }。mcpp段里的路径都是相对 verdir 的 glob,前导*用来吸收CLI11-2.7.2/这层 wrap 目录;原样的话消费者的#include <CLI/CLI.hpp>落不到任何目录。languagec++17 → c++23,与仓内其余 61 个描述符一致。它只作用于本包那个 anchor TU(CLI11 自身只要 C++11,消费者按自己声明的标准编头文件)。tests/check_mirror_urls.lua要求 CN 必须在gitcode.com/mcpp-res/之下,照原样 lint 是红的。CN 镜像
新建
mcpp-res/cli11并发布 2.7.2:CN
http=200,size=1446996,与 GLOBAL 字节一致。测试(workspace 成员
tests/examples/cli11)tests/parse.cpp断言一次完整 parse(取值 / 默认值保持 / flag / 多值选项 / 子命令)与两条失败路径(未声明的选项抛CLI::ParseError、check(CLI::Range(1,10))越界抛CLI::ValidationError),外加CLI11_VERSION == "2.7.2"和包自身的 anchor 符号 —— header-only 包的 lib target 里就只有那一个 TU,引用它才能证明包确实被编译并链接,而不是只有头文件被 include。本地用 CI 同版本 mcpp
2026.8.6.1、清掉target/与.mcpp/冷启动:产出 obj 两个:
obj/parse.o与obj/compat_CLI11/mcpp_generated/cli11_anchor.o。lint 全套(含mcpp xpkg parse严格模式)本地复现通过。不收的两个上游额外件
src/Precompile.cpp:只有当CLI11_COMPILE同时到达消费者的 TU 时才有意义 —— 那是 interface define,不是 sources 门控,feature 表达不了完整语义。src/modules/CLI11.cppm:模块层是另一种包形态(参见pkgs/n/nlohmann.json.lua),不是 compat 包的 feature。因此本包没有 feature,也就没有需要做负向验证的门控。