Skip to content

Commit a3eb692

Browse files
committed
features: drop the default set; ci: llvm 23.1.3
Most consumers name the libraries they import, so the package no longer declares a `default` feature. gen_features.py stops emitting it (and the closure code that computed it); mcpp.toml is regenerated. - examples/basic lists filesystem, json, regex and macros explicitly - path consumers (tests/dll and plugins, tests/test/utf, examples/profiles) and both templates drop the now no-op `default-features = false` - examples/git-dep keeps it: the mwrap-1.92.0 tag still has the default set - tests.yml: no `$dep/default` for the sub-projects, `default` is no longer an aggregate in the group check - README and usage docs show plain `features = [...]` dependencies CI's LLVM legs move from 22.1.8 to 23.1.3, the version .xlings.json already pins for the generator.
1 parent 5ffe15c commit a3eb692

24 files changed

Lines changed: 70 additions & 159 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
# The five host configurations and their pinned toolchains are the ones that
55
# wrapper validated; keep the set if a leg is added or dropped:
66
#
7-
# windows-latest x86_64 llvm@22.1.8 (clang-cl / clang-msvc)
7+
# windows-latest x86_64 llvm@23.1.3 (clang-cl / clang-msvc)
88
# ubuntu-24.04 x86_64 gcc@16.1.0
99
# ubuntu-24.04-arm arm64 gcc@16.1.0
10-
# ubuntu-24.04 x86_64 llvm@22.1.8
11-
# macos-latest arm64 llvm@22.1.8
10+
# ubuntu-24.04 x86_64 llvm@23.1.3
11+
# macos-latest arm64 llvm@23.1.3
1212
#
1313
# Every host is built twice, once per feature group, because a single clang
1414
# aggregate closure of the whole package can exhaust the source-location space:
@@ -97,11 +97,11 @@ jobs:
9797
fail-fast: false
9898
matrix:
9999
target:
100-
- { name: windows-llvm-msvc, os: windows-latest, arch: x86_64, toolchain: "llvm@22.1.8", install: "llvm 22.1.8" }
100+
- { name: windows-llvm-msvc, os: windows-latest, arch: x86_64, toolchain: "llvm@23.1.3", install: "llvm 23.1.3" }
101101
- { name: linux-gcc, os: ubuntu-24.04, arch: x86_64, toolchain: "gcc@16.1.0", install: "gcc 16.1.0" }
102102
- { name: linux-gcc, os: ubuntu-24.04-arm, arch: arm64, toolchain: "gcc@16.1.0", install: "gcc 16.1.0" }
103-
- { name: linux-llvm, os: ubuntu-24.04, arch: x86_64, toolchain: "llvm@22.1.8", install: "llvm 22.1.8" }
104-
- { name: macos-llvm, os: macos-latest, arch: arm64, toolchain: "llvm@22.1.8", install: "llvm 22.1.8" }
103+
- { name: linux-llvm, os: ubuntu-24.04, arch: x86_64, toolchain: "llvm@23.1.3", install: "llvm 23.1.3" }
104+
- { name: macos-llvm, os: macos-latest, arch: arm64, toolchain: "llvm@23.1.3", install: "llvm 23.1.3" }
105105
group: [A, B]
106106
steps:
107107
- uses: actions/checkout@v7
@@ -174,9 +174,9 @@ jobs:
174174
manifest = tomllib.load(open("mcpp.toml", "rb"))
175175
features = manifest["features"]
176176
# Aggregates and the CPU-gated log backend profiles are not libraries:
177-
# `default`/`all-modules` are selections, and the profiles are only
178-
# valid on x86_64 and are exercised by examples/profiles.
179-
aggregates = {"default", "all-modules"}
177+
# `all-modules` is a selection, and the profiles are only valid on
178+
# x86_64 and are exercised by examples/profiles.
179+
aggregates = {"all-modules"}
180180
profiles = {name for name in features if name.startswith("backend-")}
181181
libraries = set(features) - aggregates - profiles
182182
@@ -244,7 +244,7 @@ jobs:
244244
run: |
245245
set -euo pipefail
246246
dep="mcpplibs.mwrap.boost"
247-
features="$dep/default,$dep/${BOOST_GROUP_A//,/,$dep/}"
247+
features="$dep/${BOOST_GROUP_A//,/,$dep/}"
248248
for member in boost-m-tests-dll boost-m-tests-test-utf; do
249249
# gcc@16.1.0 on Linux arm64 targets aarch64-linux-musl with a
250250
# static C library: a static program cannot load the plugins.
@@ -281,8 +281,8 @@ jobs:
281281
- name: windows-llvm-msvc
282282
os: windows-latest
283283
arch: x86_64
284-
toolchain: llvm@22.1.8
285-
install: "llvm 22.1.8"
284+
toolchain: llvm@23.1.3
285+
install: "llvm 23.1.3"
286286
- name: linux-gcc
287287
os: ubuntu-24.04
288288
arch: x86_64
@@ -296,13 +296,13 @@ jobs:
296296
- name: linux-llvm
297297
os: ubuntu-24.04
298298
arch: x86_64
299-
toolchain: llvm@22.1.8
300-
install: "llvm 22.1.8"
299+
toolchain: llvm@23.1.3
300+
install: "llvm 23.1.3"
301301
- name: macos-llvm
302302
os: macos-latest
303303
arch: arm64
304-
toolchain: llvm@22.1.8
305-
install: "llvm 22.1.8"
304+
toolchain: llvm@23.1.3
305+
install: "llvm 23.1.3"
306306
steps:
307307
- uses: actions/checkout@v7
308308

@@ -352,8 +352,8 @@ jobs:
352352
mcpp toolchain default ${{ matrix.toolchain }}
353353
mcpp toolchain list
354354
355-
# examples/basic consumes the root package as a path dependency with the
356-
# default feature closure (umbrella import plus compiled libraries).
355+
# examples/basic consumes the root package as a path dependency with an
356+
# explicit feature list (umbrella import plus compiled libraries).
357357
- name: Build & run example (basic)
358358
shell: bash
359359
working-directory: examples

‎README.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ In an existing project:
3939

4040
```toml
4141
[dependencies]
42-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, features = ["optional"] }
42+
mcpplibs.mwrap.boost = { version = "1.92.0", features = ["optional"] }
4343
```
4444

4545
```cpp
@@ -59,14 +59,13 @@ grouping spelling (`type-traits` enables `mcpplibs.mwrap.boost.type_traits`).
5959

6060
| Feature | Purpose |
6161
|---|---|
62-
| `default` | The 51-library baseline closure (header-only core + filesystem/regex/thread/chrono/json/serialization) |
6362
| `all-modules` | Every module interface (118 entries); `log` and `unit-test-framework` stay explicit |
6463
| `macros` | The mapped macro constants module; `version` re-exports it |
6564
| `log`, `unit-test-framework` | Compiled libraries with no module: include the upstream headers |
6665
| `backend-log-avx2`, `backend-log-ssse3` | Build-time Boost.Log dump implementation (x86_64 only, mutually exclusive) |
6766

68-
Features are additive across dependency edges: `default-features = false` on one
69-
edge does not cancel a set another edge requested.
67+
List the libraries you import; each brings its `implies` closure. Features are
68+
additive across dependency edges.
7069

7170
## Tests and platforms
7271

‎README.zh.hant.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ mcpp run
3737

3838
```toml
3939
[dependencies]
40-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, features = ["optional"] }
40+
mcpplibs.mwrap.boost = { version = "1.92.0", features = ["optional"] }
4141
```
4242

4343
```cpp
@@ -57,14 +57,12 @@ feature 名一律小寫 kebab-case;模組後綴保留 Boost 自己的分組拼
5757

5858
| Feature | 作用 |
5959
|---|---|
60-
| `default` | 51 庫基線閉包(純標頭核心 + filesystem/regex/thread/chrono/json/serialization) |
6160
| `all-modules` | 全部模組介面(118 個);`log`、`unit-test-framework` 仍需明確啟用 |
6261
| `macros` | 巨集常數映射模組;`version` 會重新匯出它 |
6362
| `log`、`unit-test-framework` | 無模組的編譯庫:直接 include 上游標頭檔 |
6463
| `backend-log-avx2`、`backend-log-ssse3` | 建置期 Boost.Log dump 實作(僅 x86_64,同軸互斥) |
6564

66-
feature 在多條依賴邊上做加法聯集:某條邊寫 `default-features = false` 只關閉這條邊請求的預設集,
67-
不會撤銷另一條邊啟用的集合。
65+
列出要匯入的庫即可,各庫會帶上自己的 `implies` 閉包。feature 在多條依賴邊上做加法聯集。
6866

6967
## 測試與平台
7068

‎README.zh.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ mcpp run
3737

3838
```toml
3939
[dependencies]
40-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, features = ["optional"] }
40+
mcpplibs.mwrap.boost = { version = "1.92.0", features = ["optional"] }
4141
```
4242

4343
```cpp
@@ -57,14 +57,12 @@ feature 名一律小写 kebab-case;模块后缀保留 Boost 自己的分组拼
5757

5858
| Feature | 作用 |
5959
|---|---|
60-
| `default` | 51 库基线闭包(纯头核心 + filesystem/regex/thread/chrono/json/serialization) |
6160
| `all-modules` | 全部模块接口(118 个);`log`、`unit-test-framework` 仍需显式启用 |
6261
| `macros` | 宏常量映射模块;`version` 会重新导出它 |
6362
| `log`、`unit-test-framework` | 无模块的编译库:直接 include 上游头文件 |
6463
| `backend-log-avx2`、`backend-log-ssse3` | 构建期 Boost.Log dump 实现(仅 x86_64,同轴互斥) |
6564

66-
feature 在多条依赖边上做加法并集:某条边写 `default-features = false` 只关闭这条边请求的默认集,
67-
不会撤销另一条边启用的集合。
65+
列出要导入的库即可,各库会带上自己的 `implies` 闭包。feature 在多条依赖边上做加法并集。
6866

6967
## 测试与平台
7068

‎docs/usage.md‎

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,17 @@ namespace exists only for the macro mappings described below.
1212
## 1. Dependency declaration
1313

1414
```toml
15-
# The default feature set (51-library closure)
15+
# The libraries you import (their `implies` closure comes along)
1616
[dependencies]
17-
mcpplibs.mwrap.boost = "1.92.0"
18-
19-
# A specific set; default-features = false stops this edge from also pulling
20-
# the default closure in
21-
[dependencies]
22-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, features = ["optional", "json"] }
17+
mcpplibs.mwrap.boost = { version = "1.92.0", features = ["optional", "json"] }
2318

2419
# Everything with a module interface
2520
[dependencies]
26-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, features = ["all-modules"] }
21+
mcpplibs.mwrap.boost = { version = "1.92.0", features = ["all-modules"] }
2722

2823
# From the repository at the immutable release tag
2924
[dependencies]
30-
mcpplibs.mwrap.boost = { git = "https://github.com/mcpplibs/boost-m", tag = "mwrap-1.92.0", default-features = false, features = ["optional"] }
25+
mcpplibs.mwrap.boost = { git = "https://github.com/mcpplibs/boost-m", tag = "mwrap-1.92.0", features = ["optional"] }
3126
```
3227

3328
Version scheme: the first mwrap release is the upstream version, `1.92.0`. A
@@ -103,7 +98,7 @@ interface. Enable the feature and include the upstream headers:
10398
10499
```toml
105100
[dependencies]
106-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, features = ["log"] }
101+
mcpplibs.mwrap.boost = { version = "1.92.0", features = ["log"] }
107102
```
108103

109104
```cpp
@@ -171,24 +166,12 @@ spelling, so feature `type-traits` enables `mcpplibs.mwrap.boost.type_traits`.
171166

172167
| Feature | Effect |
173168
|---|---|
174-
| `default` | 51-library closure (see below) |
175169
| `all-modules` | All 118 module entries (117 library interfaces + `macros`); not `log`, not `unit-test-framework` |
176170
| `macros`, `version` | The mapping module and its thin re-export |
177171
| `backend-log-avx2`, `backend-log-ssse3` | Build-time Boost.Log dump implementation, x86_64 only, one per axis |
178172

179-
The default closure is closed over the module import edges:
180-
`optional variant variant2 any core container-hash mp11 type-traits algorithm
181-
iterator range io endian tuple system filesystem regex thread chrono json array
182-
assert bind compat concept-check config conversion dynamic-bitset function
183-
functional integer intrusive lambda lexical-cast move multi-array ratio
184-
smart-ptr throw-exception tokenizer type-index units utility winapi atomic
185-
container date-time math random serialization numeric version macros`.
186-
187-
Features are additive across dependency edges. `default-features = false` on one
188-
edge only closes the default set that edge would have requested: another edge may
189-
request defaults again, and explicit features always activate. Enabling a feature
190-
adds its `implies` closure, so selecting one library pulls exactly what its
191-
interface imports.
173+
Features are additive across dependency edges. Enabling a feature adds its `implies` closure, so
174+
selecting one library pulls exactly what its interface imports.
192175

193176
### 4.1 Build-time profiles
194177

@@ -201,7 +184,7 @@ a diagnostic naming the features.
201184

202185
```toml
203186
[dependencies]
204-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, backend = "log-avx2" }
187+
mcpplibs.mwrap.boost = { version = "1.92.0", backend = "log-avx2" }
205188
```
206189

207190
## 5. Platforms, ABI and runtime
@@ -310,7 +293,7 @@ pinned MinGW sysroot under `tools/`; ordinary consumers only use the committed
310293
generated files.
311294
312295
```sh
313-
mcpp build # default feature closure
296+
mcpp build --features optional # build the selected features
314297
mcpp test # every tests/*.cpp as its own program
315298
mcpp test optional # one test by pattern
316299
mcpp test --features unit-test-framework # compiled Boost.Test form

‎docs/usage.zh.md‎

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,17 @@ Boost 1.92.0 被封装为 C++23 具名模块。导入模块即可替代该库的
88
## 1. 依赖声明
99

1010
```toml
11-
# The default feature set (51-library closure)
11+
# The libraries you import (their `implies` closure comes along)
1212
[dependencies]
13-
mcpplibs.mwrap.boost = "1.92.0"
14-
15-
# A specific set; default-features = false stops this edge from also pulling
16-
# the default closure in
17-
[dependencies]
18-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, features = ["optional", "json"] }
13+
mcpplibs.mwrap.boost = { version = "1.92.0", features = ["optional", "json"] }
1914

2015
# Everything with a module interface
2116
[dependencies]
22-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, features = ["all-modules"] }
17+
mcpplibs.mwrap.boost = { version = "1.92.0", features = ["all-modules"] }
2318

2419
# From the repository at the immutable release tag
2520
[dependencies]
26-
mcpplibs.mwrap.boost = { git = "https://github.com/mcpplibs/boost-m", tag = "mwrap-1.92.0", default-features = false, features = ["optional"] }
21+
mcpplibs.mwrap.boost = { git = "https://github.com/mcpplibs/boost-m", tag = "mwrap-1.92.0", features = ["optional"] }
2722
```
2823

2924
版本方案:首个 mwrap 版本即上游版本 `1.92.0`。仅涉及封装层的修复追加修订号 `1.92.0.1`,且永不发布 `1.92.0.0`(其排序结果与 `1.92.0` 相同)。仓库标签使用另一套序列 `mwrap-<version>`;旧的 `ZheFeng7110.boost` 版本与标签不再复用。
@@ -80,7 +75,7 @@ BOOST_SCOPE_EXIT(void) { /* ... */ } BOOST_SCOPE_EXIT_END
8075
8176
```toml
8277
[dependencies]
83-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, features = ["log"] }
78+
mcpplibs.mwrap.boost = { version = "1.92.0", features = ["log"] }
8479
```
8580

8681
```cpp
@@ -131,28 +126,19 @@ static_assert(mcpplibs::mwrap::boost::macros::BOOST_VERSION == raw_version);
131126

132127
| 特征 | 作用 |
133128
|---|---|
134-
| `default` | 51 个库构成的闭包(见下文) |
135129
| `all-modules` | 全部 118 个模块条目(117 个库接口 + `macros`);不含 `log`,不含 `unit-test-framework` |
136130
| `macros`、`version` | 映射模块及其薄重导出 |
137131
| `backend-log-avx2`、`backend-log-ssse3` | 构建期的 Boost.Log dump 实现,仅限 x86_64,每条轴各择其一 |
138132

139-
默认闭包沿模块导入边闭合:
140-
`optional variant variant2 any core container-hash mp11 type-traits algorithm
141-
iterator range io endian tuple system filesystem regex thread chrono json array
142-
assert bind compat concept-check config conversion dynamic-bitset function
143-
functional integer intrusive lambda lexical-cast move multi-array ratio
144-
smart-ptr throw-exception tokenizer type-index units utility winapi atomic
145-
container date-time math random serialization numeric version macros`。
146-
147-
特征在各依赖边上可累加。某条边上的 `default-features = false` 只关闭该边本来会请求的默认集合:其他边仍可再次请求默认特征,而显式特征总是生效。启用某特征会追加其 `implies` 闭包,因此选中一个库时,拉取的正好是该库接口所导入的内容。
133+
特征在各依赖边上可累加。启用某特征会追加其 `implies` 闭包,因此选中一个库时,拉取的正好是该库接口所导入的内容。
148134

149135
### 4.1 构建期配置档
150136

151137
`backend-log-avx2` / `backend-log-ssse3` 以逐翻译单元的 `-mavx2` / `-mssse3` 以及包侧分派宏来编译 Boost.Log 的 AVX2/SSSE3 dump 翻译单元。基础构建有意排除这些翻译单元(无条件的 `<immintrin.h>` 会破坏非 x86 目标)。两者都受 x86_64 约束,且在同一轴上互斥;当架构不符或同一轴上出现第二个配置档时,`build.mcpp` 会以指出相应特征的诊断信息拒绝。
152138

153139
```toml
154140
[dependencies]
155-
mcpplibs.mwrap.boost = { version = "1.92.0", default-features = false, backend = "log-avx2" }
141+
mcpplibs.mwrap.boost = { version = "1.92.0", backend = "log-avx2" }
156142
```
157143

158144
## 5. 平台、ABI 与运行时
@@ -212,7 +198,7 @@ clang-msvc 上有两个影响模块的 clang 缺陷(llvm 22.1.8 与 23.1.3 均
212198
受测的构建工具固定在 `.xlings.json` 中(`mcpp 2026.11.27.1`);CI 在每条组合上运行同一固定版本。生成(重新生成导出列表或审计头文件)还需要 `.xlings.json` 中固定的 clang++ 23.1.3,以及 `tools/` 下固定的 MinGW sysroot;普通消费者只使用已提交的生成文件。
213199
214200
```sh
215-
mcpp build # default feature closure
201+
mcpp build --features optional # build the selected features
216202
mcpp test # every tests/*.cpp as its own program
217203
mcpp test optional # one test by pattern
218204
mcpp test --features unit-test-framework # compiled Boost.Test form

‎examples/basic/mcpp.toml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
#
66
# The dependency is a local path dep: examples/basic/ is not a workspace member,
77
# it consumes the repo root package `mcpplibs.mwrap.boost` exactly like an
8-
# external project, with the default feature set (filesystem + json + regex).
8+
# external project. The manifest names the libraries the demo imports (system,
9+
# the rest of their closure, comes in through `implies`) and `macros` for the
10+
# version constants it prints.
911
[package]
1012
name = "boost-example"
1113
version = "0.1.0"
1214
description = "Example consumer: import mcpplibs.mwrap.boost; (filesystem + json + regex)"
1315
license = "Apache-2.0"
1416

1517
[dependencies]
16-
mcpplibs.mwrap.boost = { path = "../.." }
18+
mcpplibs.mwrap.boost = { path = "../..", features = ["filesystem", "json", "regex", "macros"] }

‎examples/git-dep/mcpp.toml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
#
33
# Same code shape as examples/basic/, but the dependency is declared the way an
44
# external project would consume it: from the repository at the immutable
5-
# `mwrap-` release tag, with default-features = false and an explicit feature
6-
# list (docs/usage.md §1).
5+
# `mwrap-` release tag, with an explicit feature list (docs/usage.md §1).
6+
# `default-features = false` stays while the tag is mwrap-1.92.0: that release
7+
# still declares a 51-library `default` set, which later releases dropped.
78
#
89
# mcpp run build + run
910
# mcpp build just build

‎examples/git-dep/src/main.cpp‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// boost-example-git-dep — consumer demo: git dep + selective features.
22
//
3-
// The manifest closes default features off and opts in to exactly three
4-
// libraries (optional / json / version), so only those module interfaces are
5-
// built — `import mcpplibs.mwrap.boost;` re-exports precisely the activated set (empty
3+
// The manifest opts in to exactly three libraries (optional / json /
4+
// version), so only those module interfaces are built — `import mcpplibs.mwrap.boost;` re-exports precisely the activated set (empty
65
// closures are also legal, but here it is non-empty).
76
// No `#include <boost/...>` anywhere — everything comes from the module layer.
87
import std;

‎examples/profiles/mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ description = "Example consumer: profile feature backend-log-avx2 (backend = sug
1818
license = "Apache-2.0"
1919

2020
[dependencies]
21-
mcpplibs.mwrap.boost = { path = "../..", default-features = false, backend = "log-avx2" }
21+
mcpplibs.mwrap.boost = { path = "../..", backend = "log-avx2" }

0 commit comments

Comments
 (0)