Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
517 changes: 517 additions & 0 deletions .agents/docs/2026-11-09-module-test-hardening-design.md

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion .agents/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
- `todos/` 放尚未完成的工作项,它们不是决定的记录。
- 移动或改名用 `tools/doc-tools/move_record.py`,它同时改写仓库中对该文件的引用。

共 21 篇记录(其中 0 篇已归档),0 项待办。
共 22 篇记录(其中 0 篇已归档),0 项待办。

## 进行中

- [模块封装层测试加固:常用 34 个库的示例覆盖与自定义类型套件](2026-11-09-module-test-hardening-design.md) — active

## 按主题

Expand All @@ -37,10 +41,15 @@

- [设计记录的管理:只增不删、按年归档、生成的索引与 `tools/doc-tools/`](2026-11-08-design-records-management-design.md) — landed

### tests

- [模块封装层测试加固:常用 34 个库的示例覆盖与自定义类型套件](2026-11-09-module-test-hardening-design.md) — active

## 按日期

### 2026-11

- [模块封装层测试加固:常用 34 个库的示例覆盖与自定义类型套件](2026-11-09-module-test-hardening-design.md) — active
- [设计记录的管理:只增不删、按年归档、生成的索引与 `tools/doc-tools/`](2026-11-08-design-records-management-design.md) — landed
- [封装层生成原理改造:clang JSON AST + 声明式策略 + `--check`](2026-11-05-json-ast-generation.md)

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
# Every host is built twice, once per feature group, because a single clang
# aggregate closure of the whole package can exhaust the source-location space:
#
# A — the 105 library features of the original group A: 103 module-bearing
# libraries plus the two compiled include-only features (`log`,
# `unit-test-framework`);
# A — the 105 library features of the original group A (103 module-bearing
# libraries plus the two compiled include-only features `log` and
# `unit-test-framework`), plus `conversion` (six function templates,
# added by the module test hardening);
# B — the twelve heavy libraries (asio, beast, geometry, ...) plus the two
# wrapper-only modules the mwrap migration added (`version`, `macros`),
# so group A's aggregate closure stays at the module count whose limit was
Expand Down Expand Up @@ -89,10 +90,11 @@ env:
# Leave the runners room: the vendored tree is large and every leg compiles
# Boost from the same checkout.
MCPP_JOBS: '4'
# M12 grouping: group A is the original wrapper's 105-feature set; group B is
# M12 grouping: group A is the original wrapper's 105-feature set plus
# `conversion`; group B is
# its twelve heavy libraries plus the two wrapper-only modules added by the
# mwrap migration. Both are kebab-case features declared in mcpp.toml.
BOOST_GROUP_A: "optional,variant,variant2,any,core,container-hash,mp11,static-string,scope,type-traits,algorithm,iterator,range,io,rational,endian,tuple,system,filesystem,regex,thread,chrono,program-options,stacktrace,json,url,align,array,assert,assign,bimap,bind,bloom,callable-traits,circular-buffer,compat,concept-check,config,convert,crc,decimal,dll,dynamic-bitset,flyweight,format,function,functional,hash2,heap,histogram,hof,icl,integer,intrusive,lambda,lambda2,leaf,lexical-cast,lockfree,logic,move,multi-array,multi-index,outcome,parser,pfr,poly-collection,pool,property-map,property-tree,ptr-container,ratio,safe-numerics,signals2,smart-ptr,sort,statechart,stl-interfaces,throw-exception,tokenizer,type-index,units,unordered,utility,uuid,winapi,yap,atomic,charconv,cobalt,container,contract,date-time,graph,iostreams,log,math,nowide,process,random,serialization,unit-test-framework,timer,type-erasure,wave"
BOOST_GROUP_A: "optional,variant,variant2,any,core,container-hash,mp11,static-string,scope,type-traits,algorithm,iterator,range,io,rational,endian,tuple,system,filesystem,regex,thread,chrono,program-options,stacktrace,json,url,align,array,assert,assign,bimap,bind,bloom,callable-traits,circular-buffer,compat,concept-check,config,conversion,convert,crc,decimal,dll,dynamic-bitset,flyweight,format,function,functional,hash2,heap,histogram,hof,icl,integer,intrusive,lambda,lambda2,leaf,lexical-cast,lockfree,logic,move,multi-array,multi-index,outcome,parser,pfr,poly-collection,pool,property-map,property-tree,ptr-container,ratio,safe-numerics,signals2,smart-ptr,sort,statechart,stl-interfaces,throw-exception,tokenizer,type-index,units,unordered,utility,uuid,winapi,yap,atomic,charconv,cobalt,container,contract,date-time,graph,iostreams,log,math,nowide,process,random,serialization,unit-test-framework,timer,type-erasure,wave"
BOOST_GROUP_B: "accumulators,asio,beast,geometry,gil,hana,interprocess,mqtt5,multiprecision,numeric,polygon,qvm,version,macros"

jobs:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![mcpp-community](https://img.shields.io/badge/mcpp--community-mwrap-blue)](https://github.com/mcpp-community)
[![tests](https://github.com/mcpplibs/boost-m/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/mcpplibs/boost-m/actions/workflows/tests.yml)

116 Boost libraries are reachable as named modules: the wrapper runs
117 Boost libraries are reachable as named modules: the wrapper runs
`#include` inside a module's global module fragment and re-exports the upstream
entities with `export using`, so types, overloads, ADL and spelling stay
Boost's. The header-only, compiled and macro-only libraries keep their own
Expand Down Expand Up @@ -60,7 +60,7 @@ grouping spelling (`type-traits` enables `mcpplibs.mwrap.boost.type_traits`).
| Feature | Purpose |
|---|---|
| `default` | The 50-library baseline closure (header-only core + filesystem/regex/thread/chrono/json/serialization) |
| `all-modules` | Every module interface (117 entries); `log` and `unit-test-framework` stay explicit |
| `all-modules` | Every module interface (118 entries); `log` and `unit-test-framework` stay explicit |
| `macros` | The mapped macro constants module; `version` re-exports it |
| `log`, `unit-test-framework` | Compiled libraries with no module: include the upstream headers |
| `backend-log-avx2`, `backend-log-ssse3` | Build-time Boost.Log dump implementation (x86_64 only, mutually exclusive) |
Expand Down
4 changes: 2 additions & 2 deletions README.zh.hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![mcpp-community](https://img.shields.io/badge/mcpp--community-mwrap-blue)](https://github.com/mcpp-community)
[![tests](https://github.com/mcpplibs/boost-m/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/mcpplibs/boost-m/actions/workflows/tests.yml)

116 個 Boost 庫可以按具名模組使用:封裝在模組的全域模組片段中 `#include` 上游標頭檔,
117 個 Boost 庫可以按具名模組使用:封裝在模組的全域模組片段中 `#include` 上游標頭檔,
再用 `export using` 重新匯出上游實體,因此型別、多載、ADL 與拼寫都仍是 Boost 的。
純標頭庫、編譯庫與純巨集庫各自保留既有消費方式;程式裡只有 vendored Boost 這一實作,
不會重複連結第二份。
Expand Down Expand Up @@ -58,7 +58,7 @@ feature 名一律小寫 kebab-case;模組後綴保留 Boost 自己的分組拼
| Feature | 作用 |
|---|---|
| `default` | 50 庫基線閉包(純標頭核心 + filesystem/regex/thread/chrono/json/serialization) |
| `all-modules` | 全部模組介面(117 個);`log`、`unit-test-framework` 仍需明確啟用 |
| `all-modules` | 全部模組介面(118 個);`log`、`unit-test-framework` 仍需明確啟用 |
| `macros` | 巨集常數映射模組;`version` 會重新匯出它 |
| `log`、`unit-test-framework` | 無模組的編譯庫:直接 include 上游標頭檔 |
| `backend-log-avx2`、`backend-log-ssse3` | 建置期 Boost.Log dump 實作(僅 x86_64,同軸互斥) |
Expand Down
4 changes: 2 additions & 2 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![mcpp-community](https://img.shields.io/badge/mcpp--community-mwrap-blue)](https://github.com/mcpp-community)
[![tests](https://github.com/mcpplibs/boost-m/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/mcpplibs/boost-m/actions/workflows/tests.yml)

116 个 Boost 库可以按命名模块使用:封装在模块的全局模块片段中 `#include` 上游头文件,
117 个 Boost 库可以按命名模块使用:封装在模块的全局模块片段中 `#include` 上游头文件,
再用 `export using` 重新导出上游实体,因此类型、重载、ADL 和拼写都仍是 Boost 的。
纯头库、编译库与纯宏库各自保留既有消费方式;程序里只有 vendored Boost 这一份实现,
不会重复链接第二份。
Expand Down Expand Up @@ -58,7 +58,7 @@ feature 名一律小写 kebab-case;模块后缀保留 Boost 自己的分组拼
| Feature | 作用 |
|---|---|
| `default` | 50 库基线闭包(纯头核心 + filesystem/regex/thread/chrono/json/serialization) |
| `all-modules` | 全部模块接口(117 个);`log`、`unit-test-framework` 仍需显式启用 |
| `all-modules` | 全部模块接口(118 个);`log`、`unit-test-framework` 仍需显式启用 |
| `macros` | 宏常量映射模块;`version` 会重新导出它 |
| `log`、`unit-test-framework` | 无模块的编译库:直接 include 上游头文件 |
| `backend-log-avx2`、`backend-log-ssse3` | 构建期 Boost.Log dump 实现(仅 x86_64,同轴互斥) |
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ C++23 module layer makes them importable while preserving the upstream API.
The wrapper does not re-implement Boost, does not relocate its entities into a
new namespace, and does not link a second Boost implementation.

- 116 library module interfaces + the root module + the macro mapping module.
- 117 library module interfaces + the root module + the macro mapping module.
- 22 pure include-only libraries and 2 compiled include-only features (`log`,
`unit-test-framework`): consumed by header, listed in [usage.md](usage.md).
- 11 libraries need external toolchains/SDKs and are not declared.
Expand Down Expand Up @@ -220,7 +220,7 @@ generator change, not as an unexplained API change.
byte- and mtime-idempotent. Feature names are kebab-case; `implies` lists
feature names (never internal keys), derived from each interface's
`export import` lines plus the generated body edges. `modules.lst` is the
feature → module map `build.mcpp` reads; `all-modules` expands to the 117 module
feature → module map `build.mcpp` reads; `all-modules` expands to the 118 module
entries.
- `gen_audit.py` reports internal-linkage functions, anonymous-namespace
entities and explicit specializations per library from the same AST; its
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
模块让其可被 import,同时保留上游 API。包装层不重新实现 Boost,不把它的实体
搬进新的命名空间,也不链接第二份 Boost 实现。

- 116 个库模块接口 + 根模块 + 宏映射模块。
- 117 个库模块接口 + 根模块 + 宏映射模块。
- 22 个纯 include-only 库,以及 2 个需要编译的 include-only feature(`log`、
`unit-test-framework`):按头文件方式消费,列于 [usage.zh.md](usage.zh.md)。
- 11 个库需要外部工具链/SDK,未做声明。
Expand Down Expand Up @@ -195,7 +195,7 @@ clang++ -std=c++23 --target=x86_64-w64-mingw32 --sysroot=<pinned MinGW> \
mtime 上都是幂等的。feature 名使用 kebab-case;`implies` 列出的是 feature
名(绝不是内部键),由各接口的 `export import` 行加上生成的函数体边推导而来。
`modules.lst` 是 `build.mcpp` 读取的 feature → 模块映射;`all-modules` 展开为
117 个模块条目。
118 个模块条目。
- `gen_audit.py` 从同一份 AST 报告每个库的内部链接函数、匿名命名空间实体和显式
特化;其报告要结合已提交的代码树审阅,不能当成“不属于公共 API”。

Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ spelling, so feature `type-traits` enables `mcpplibs.mwrap.boost.type_traits`.
| Feature | Effect |
|---|---|
| `default` | 50-library closure (see below) |
| `all-modules` | All 117 module entries (116 library interfaces + `macros`); not `log`, not `unit-test-framework` |
| `all-modules` | All 118 module entries (117 library interfaces + `macros`); not `log`, not `unit-test-framework` |
| `macros`, `version` | The mapping module and its thin re-export |
| `backend-log-avx2`, `backend-log-ssse3` | Build-time Boost.Log dump implementation, x86_64 only, one per axis |

Expand Down
2 changes: 1 addition & 1 deletion docs/usage.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static_assert(mcpplibs::mwrap::boost::macros::BOOST_VERSION == raw_version);
| 特征 | 作用 |
|---|---|
| `default` | 50 个库构成的闭包(见下文) |
| `all-modules` | 全部 117 个模块条目(116 个库接口 + `macros`);不含 `log`,不含 `unit-test-framework` |
| `all-modules` | 全部 118 个模块条目(117 个库接口 + `macros`);不含 `log`,不含 `unit-test-framework` |
| `macros`、`version` | 映射模块及其薄重导出 |
| `backend-log-avx2`、`backend-log-ssse3` | 构建期的 Boost.Log dump 实现,仅限 x86_64,每条轴各择其一 |

Expand Down
3 changes: 2 additions & 1 deletion generated/exports/algorithm.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// GENERATED by tools/gen_exports.py - DO NOT EDIT
// lib=algorithm boost=1.92.0 target=x86_64-w64-mingw32 entities=477
// lib=algorithm boost=1.92.0 target=x86_64-w64-mingw32 entities=478

export namespace boost {
using boost::all;
Expand Down Expand Up @@ -361,6 +361,7 @@ export namespace boost { namespace algorithm {
using boost::algorithm::token_finder;
using boost::algorithm::transform_exclusive_scan;
using boost::algorithm::transform_inclusive_scan;
using boost::algorithm::transform_reduce;
using boost::algorithm::trim;
using boost::algorithm::trim_all;
using boost::algorithm::trim_all_copy;
Expand Down
4 changes: 3 additions & 1 deletion generated/exports/bimap.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// GENERATED by tools/gen_exports.py - DO NOT EDIT
// lib=bimap boost=1.92.0 target=x86_64-w64-mingw32 entities=190
// lib=bimap boost=1.92.0 target=x86_64-w64-mingw32 entities=192

export namespace boost {
using boost::bimap;
Expand All @@ -9,6 +9,8 @@ export namespace boost {
}

export namespace boost { namespace bimaps {
using boost::bimaps::_data;
using boost::bimaps::_key;
using boost::bimaps::_relation;
using boost::bimaps::bimap;
using boost::bimaps::left_based;
Expand Down
4 changes: 3 additions & 1 deletion generated/exports/container.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// GENERATED by tools/gen_exports.py - DO NOT EDIT
// lib=container boost=1.92.0 target=x86_64-w64-mingw32 entities=976
// lib=container boost=1.92.0 target=x86_64-w64-mingw32 entities=978

export namespace boost { namespace container {
using boost::container::DeepSwapAllocNMaxStorage;
Expand Down Expand Up @@ -1006,6 +1006,8 @@ export namespace boost { namespace container { namespace pmr {
using boost::container::pmr::string;
using boost::container::pmr::synchronized_pool_resource;
using boost::container::pmr::unsynchronized_pool_resource;
using boost::container::pmr::vector;
using boost::container::pmr::vector_of;
using boost::container::pmr::wstring;
}}}

Expand Down
3 changes: 3 additions & 0 deletions generated/exports/conversion.deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mcpplibs.mwrap.boost.assert
mcpplibs.mwrap.boost.smart_ptr
mcpplibs.mwrap.boost.throw_exception
14 changes: 14 additions & 0 deletions generated/exports/conversion.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// GENERATED by tools/gen_exports.py - DO NOT EDIT
// lib=conversion boost=1.92.0 target=x86_64-w64-mingw32 entities=6

export namespace boost {
using boost::implicit_cast;
using boost::polymorphic_cast;
using boost::polymorphic_downcast;
using boost::polymorphic_pointer_cast;
using boost::polymorphic_pointer_downcast;
}

export namespace boost { namespace detail {
using boost::detail::icast_identity;
}}
5 changes: 5 additions & 0 deletions generated/exports/convert.deps
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
mcpplibs.mwrap.boost.assert
mcpplibs.mwrap.boost.config
mcpplibs.mwrap.boost.core
mcpplibs.mwrap.boost.lexical_cast
mcpplibs.mwrap.boost.math
mcpplibs.mwrap.boost.mp11
mcpplibs.mwrap.boost.optional
mcpplibs.mwrap.boost.type_traits
mcpplibs.mwrap.boost.utility
Loading
Loading