Skip to content

Commit 295d21e

Browse files
2026.10.31.2: test-launch, the contract's target side, the Windows launcher's platform (#872)
- mcpp test <name> --print-launch: one test's launch as the mcpp.launch envelope (test-launch feature). - The build's contract states the target side: the layers' headers and flags, the engine's predefines, the realised C environment. - The Windows launcher of a self-contained package is built over the platform mcpp's openkal rows pin, whichever openkal-platform the project selects (e2e 995 over 0.19.0). Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 304487b commit 295d21e

26 files changed

Lines changed: 488 additions & 32 deletions

‎.agents/docs/2026-10-30-ecosystem-part2-ide-and-language-service-design.md‎

Lines changed: 67 additions & 22 deletions
Large diffs are not rendered by default.

‎CHANGELOG.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@
44
> Each `## [<version>]` section is that release's notes. Entries are written in English
55
> from 2026.9.28.3 on; earlier entries remain as written.
66

7+
## [2026.10.31.2] - 2026-10-31
8+
9+
### Added
10+
11+
- **`mcpp test <name> --print-launch`** (feature `test-launch`, docs/50 §9):
12+
the one test the pattern names, built as `mcpp test` builds it and described
13+
as `mcpp test` would start it -- its runner, the environment the run adds, the
14+
arguments after `--` -- in the `mcpp.launch` envelope `mcpp run
15+
--print-launch` prints, with `test` naming it. A debugger starts what it
16+
describes (an IDE debugging a test or one of its cases, design 2026-10-30
17+
part 2 §7.4). A pattern several tests contain resolves to the test named
18+
exactly; one naming several, `--list`, `--no-run`, `--archive`,
19+
`--message-format json`, several legs and several members are refused.
20+
21+
### Fixed
22+
23+
- **The build's contract states the target side** (`${mcpp.contract}`,
24+
docs/30). Its words held the configuration's own flags only: a foreign build
25+
reading it for an ok image (`<arch>-openkal`) had neither the C library's and
26+
the C++ runtime's headers nor `__OPENKAL__`, and could not compile
27+
`<stdio.h>`. They now end with what every unit receives from beneath it: the
28+
platform's layers' include directories and flags, the engine's predefines
29+
(`__MCPP_TARGET_<OS>__`, `__OPENKAL__`) and the realised C environment. e2e 994
30+
compiles a C and a C++ unit for the target with the contract alone.
31+
- **A package's Windows launcher builds whichever openkal-platform release the
32+
project selects** (SPEC-014 §4.3). The launcher (`bin/<name>.exe`) is mcpp's
33+
program, and its `mcpplibs.os` pins one openkal release; it was built over the
34+
project's platform, so a platform whose version group names a newer openkal
35+
(openkal-platform 0.19.0) gave its graph two openkal releases and `mcpp pack`
36+
stopped. It is now built over the platform mcpp's openkal rows pin, the one
37+
its `mcpplibs.os` was released against. e2e 995 packs a project that selects
38+
openkal-platform 0.19.0 with its Windows launcher.
39+
740
## [2026.10.31.1] - 2026-10-31
841

942
### Added

‎docs/08-testing.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ One NDJSON record per test, for a CI job or an editor. The schema and its
236236
version are [50 — Machine-Readable Output](50-machine-output.md); what belongs
237237
here is only that the flag exists and that the human format is the default.
238238

239+
```bash
240+
mcpp test unit/math --print-launch -- --gtest_filter=Math.Adds
241+
```
242+
243+
Builds the one test the pattern names and prints how `mcpp test` would start it
244+
(the `mcpp.launch` envelope, mcpp 2026.10.31.2+), for a debugger to start: the
245+
runner, the environment the run adds and the arguments after `--` are in it.
246+
239247
## Current limitations
240248

241249
- A test is one `.cpp` producing one program. mcpp does not discover cases

‎docs/10-pack-and-release.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,9 @@ own arguments, looking for the runner first in `libexec/<runner>/<os>-<arch>/`
818818
and then on `PATH`. The Windows launcher is the engine's program built for
819819
`x86_64-windows-gnu`: it finds the package from its own path, picks the image
820820
of the machine's architecture, and starts the runner the same way; no `.cmd` is
821-
written. A machine of an architecture the package does not hold gets exit
821+
written. Where the build's platform has a hosted arrangement for that row, the
822+
launcher is built over the platform mcpp's openkal rows pin rather than the
823+
project's, since the `mcpplibs.os` release it uses pins that platform's openkal. A machine of an architecture the package does not hold gets exit
822824
status 126 and a sentence naming both. Files `[runtime] deploy` places lie
823825
beside each leg's image.
824826

‎docs/50-machine-output.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ envelope says when either has changed since.
244244
|---|---|---|---|
245245
| `target-sets` | 2026.10.31.1 (meaning from 2026.10.30.1) | `--target openkal` and the other sets expand to their legs (SPEC-015 §1) | an IDE's target picker |
246246
| `pkg-format-list` | 2026.10.31.1 (meaning from 2026.10.30.1) | `--pkg-format tar,okb` writes each container of one tree (SPEC-014 §5.4) | an IDE's pack form |
247+
| `test-launch` | 2026.10.31.2 | `mcpp test <name> --print-launch` prints the `mcpp.launch` of one test (below) | an IDE debugging a test |
247248

248249
### How a tool runs mcpp for a project
249250

@@ -1001,6 +1002,18 @@ starting it. `data` is `program`, `argv`, `cwd`, `env` and `via`, as
10011002
`launch` above. `--print-launch` takes no `--format`: on `mcpp run`, `--pkg-format`
10021003
names a distributable.
10031004

1005+
```
1006+
mcpp test <name> --print-launch [-- <arguments>]
1007+
```
1008+
1009+
The same for one test (feature `test-launch`, 2026.10.31.2): the test `<name>` names is
1010+
built as `mcpp test` builds it and described as `mcpp test` would start it --
1011+
its runner, the environment the run adds, and the arguments after `--` -- with
1012+
`test` in `data` naming it. A name that several tests contain is resolved to
1013+
the one named exactly; a pattern that names several is refused, as are
1014+
`--list`, `--no-run`, `--archive`, `--message-format json`, several legs and
1015+
several members. A debugger starts what the envelope describes.
1016+
10041017
## 10. Denying effects — `--deny` *(mcpp 2026.10.26.1+)*
10051018

10061019
```

‎docs/zh/08-testing.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,13 @@ mcpp test --message-format json
208208
[50 —— 机器可读输出](50-machine-output.md);本章只交代这个旗标存在,以及人类可读
209209
格式是默认值。
210210

211+
```bash
212+
mcpp test unit/math --print-launch -- --gtest_filter=Math.Adds
213+
```
214+
215+
构建该模式指定的一个测试,并打印 `mcpp test` 启动它的方式(`mcpp.launch` 信封,mcpp 2026.10.31.2+),
216+
供调试器启动:其中包括运行器、运行所加的环境与 `--` 之后的参数。
217+
211218
## 当前边界
212219

213220
- 一个测试是一个 `.cpp` 产出一个程序。mcpp 不发现文件内部的用例,因此框架的逐用例

‎docs/zh/10-pack-and-release.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ target/dist/hello-0.1.0-openkal/
709709
包的根,按 `uname -m`(`x86_64`、`amd64` → `x86_64`;`aarch64`、`arm64` → `aarch64`)选择架构目录,Git Bash、MSYS 与
710710
Cygwin 的 shell 交给 `bin/<name>.exe`,以该目录中的映像与自身的参数启动运行器,先在 `libexec/<runner>/<os>-<arch>/`
711711
中、再在 `PATH` 上查找运行器。Windows 启动器是为 `x86_64-windows-gnu` 构建的引擎的程序:从自身路径找到包,选本机
712-
架构的映像,以同样的方式启动运行器;不生成 `.cmd`。包中没有本机架构时以状态 126 退出,写出两者。
712+
架构的映像,以同样的方式启动运行器;不生成 `.cmd`。构建的平台为该行提供宿主安排时,启动器在 mcpp 的 openkal 行固定的
713+
平台上构建,而不是项目选择的平台上,因为它使用的 `mcpplibs.os` 版本固定了该平台的 openkal。包中没有本机架构时以状态 126 退出,写出两者。
713714
`[runtime] deploy` 放置的文件位于每条腿的映像旁边。
714715

715716
`--mode self-contained` 时运行器随包携带:对 `--systems` 的每个系统(`linux`、`macos`、`windows` 取腿的全部架构;

‎docs/zh/50-machine-output.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ effects 采用具名的方式而不是一个 `destructive: true|false`,因为
207207
|---|---|---|---|
208208
| `target-sets` | 2026.10.31.1(语义自 2026.10.30.1) | `--target openkal` 等集合展开为其腿(SPEC-015 §1) | IDE 的 target 选择 |
209209
| `pkg-format-list` | 2026.10.31.1(语义自 2026.10.30.1) | `--pkg-format tar,okb` 写出一棵树的各个容器(SPEC-014 §5.4) | IDE 的打包界面 |
210+
| `test-launch` | 2026.10.31.2 | `mcpp test <name> --print-launch` 打印一个测试的 `mcpp.launch`(见下) | 调试测试的 IDE |
210211

211212
### 工具为项目运行 mcpp 的方式
212213

@@ -889,6 +890,15 @@ mcpp run [target] --print-launch
889890
`argv`、`cwd`、`env` 与 `via`,同上文的 `launch`。`--print-launch` 不接受
890891
`--format`:在 `mcpp run` 上,`--pkg-format` 表示可分发物的格式。
891892

893+
```
894+
mcpp test <name> --print-launch [-- <参数>]
895+
```
896+
897+
对一个测试作同样的描述(特性 `test-launch`,2026.10.31.2):`<name>` 指定的测试按 `mcpp test`
898+
的方式构建,并按 `mcpp test` 启动它的方式描述——它的运行器、运行所加的环境、`--` 之后的参数——`data`
899+
另以 `test` 给出测试名。多个测试名包含该模式时取名字完全相同的那个;仍指向多个测试时拒绝,`--list`、
900+
`--no-run`、`--archive`、`--message-format json`、多条腿与多个成员同样拒绝。调试器启动信封描述的程序。
901+
892902
## 10. 拒绝副作用 —— `--deny` *(mcpp 2026.10.26.1+)*
893903

894904
```

‎mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mcpp"
3-
version = "2026.10.31.1"
3+
version = "2026.10.31.2"
44
description = "Modern C++ build & package management tool"
55
license = "Apache-2.0"
66
authors = ["mcpp-community"]

‎modules/versioning/src/version.cppm‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ import std;
3131

3232
export namespace mcpp {
3333

34-
inline constexpr std::string_view MCPP_VERSION = "2026.10.31.1";
34+
inline constexpr std::string_view MCPP_VERSION = "2026.10.31.2";
3535

3636
} // namespace mcpp

0 commit comments

Comments
 (0)