Skip to content
Merged
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
852 changes: 852 additions & 0 deletions .agents/docs/2026-12-06-cli-surface-people-and-agents-design.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion .agents/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ superseded_by: 2026-09-07-....md # when status is superseded
---
```

376 records.
377 records.

## By subject

Expand Down Expand Up @@ -95,6 +95,7 @@ Records that declare one. Everything else is listed by date below.

### ecosystem

- [命令行表面的两种读者:帮助与固定输出的版式和样式、包的种类与信息、包自带的 agent 说明](2026-12-06-cli-surface-people-and-agents-design.md) — active
- [生态与外部的交界:工具链的事实、二进制库交付物、被启动的外部程序、名字的拼写与共享的状态](2026-11-27-ecosystem-boundary-design.md) — active
- [包的特性作为机器可读的回答:一个目录项,两种来源,三种状态(mcpp#992)](2026-11-21-package-features-query-design.md) — active
- [离线、宿主输入与工具链的缺省:按内容取归档的来源、项目的取齐、宿主输入的声明、工具链的解析与锁、缺省版本的规则(mcpp#988、#989、#990)](2026-11-21-offline-host-inputs-and-toolchain-defaults-design.md) — active
Expand Down Expand Up @@ -216,6 +217,9 @@ Records that declare one. Everything else is listed by date below.

## By date

### 2026-12

- [命令行表面的两种读者:帮助与固定输出的版式和样式、包的种类与信息、包自带的 agent 说明](2026-12-06-cli-surface-people-and-agents-design.md) — active
### 2026-11

- [陈述的闭包、单一读者与六项功能:十四项缺陷的收敛设计](2026-11-27-stated-closure-single-reader-and-feature-designs.md) — landed
Expand Down
8 changes: 8 additions & 0 deletions .agents/skills/mcpp-contributing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ git checkout -b <type>/<short-description>
- **循环嵌套不超过两层**:第三层改为具名的辅助函数、一次扁平的遍历(例如带深度的
`recursive_directory_iterator`)或先收集再处理;确有必要保留三层时,在该处注释写明理由
- 平台相关代码放在 `src/platform/` 目录下
- **接口在前,其余在私有片段**:一个 `.cppm` 在 `module :private;` 之前只写导出的接口与它所需的导入(导出的
模板、`constexpr` 与推导返回类型的函数连同函数体);非导出的声明、全部实现与只有实现用到的导入写在片段之后。
实现单元(`module X;` 的 `.cpp`)并入其 `.cppm` 的片段;按系统选择的 `.cpp`(`src/native/<system>/`)与
`build/prepare/*.cpp` 保持独立,它们用到的非导出声明留在片段之前。片段之前不写预处理指令、未命名的命名空间、
命名空间作用域的 `static` 与 using 指令(自举版本按原样构建这样的源文件,GCC 不能构建)。片段使 BMI 只含接口:
GCC 16 读取 `import mcpp.cli` 的递归随导入图的深度增长,在 8 MiB 的栈上溢出(mcpp#1027 UP-11)。`modules/manifest`、
`build/execute` 等仍按原样书写:改动它们的 BMI 触发 GCC 16 读取 BMI 的缺陷(`Bad file data`、隐式析构函数的
异常规格),见 mcpp#1027 UP-12

**构建验证**

Expand Down
11 changes: 3 additions & 8 deletions .github/actions/bootstrap-mcpp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,9 @@ inputs:
# comment here listed the files to keep in lock-step, and that list was
# already incomplete; that is why the check exists.)
#
# Hard floor: 0.4.69. The index's SPEC-001 short-name migration put two
# packages named `lua` in one repo (`compat:lua` and `mcpplibs.capi:lua`,
# both pulled in transitively by mcpplibs.xpkg). Before 0.4.69
# (openxlings/xlings#381) a repo keyed its table by the bare
# `package.name`, so one of the two was simply unreachable — and which one
# depended on the machine, which is why CI failed on `compat:lua` on
# Windows and `mcpplibs.capi:lua` on Linux. Never pin below that.
default: '2026.12.5.2'
# The floor is the pin itself: mcpp uses no provider below it, and the
# pin's comment in xlings.cppm states what each floor added.
default: '2026.12.5.3'

outputs:
sandbox-key:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-macos-llvm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
# Floor imposed by the index, not a routine bump — see
# .github/actions/bootstrap-mcpp/action.yml for why 0.4.69 is required
# (two packages named `lua` in one repo need openxlings/xlings#381).
default: '2026.12.5.2'
default: '2026.12.5.3'
image:
description: >
The runner label the job runs on (macos-15, xcode-27). It is part of the
Expand Down
4 changes: 2 additions & 2 deletions .github/tools/path-identity.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ src/build/runtime_validation.cppm 3
src/build/schedule/compiler_transaction.cppm 2
src/build/schedule/detach_codegen.cppm 2
src/config.cppm 1
src/home/files.cpp 1
src/home/files.cppm 1
src/modgraph/scanner.cppm 1
src/pack/distribution.cppm 2
src/pack/pack.cppm 5
Expand All @@ -25,6 +25,6 @@ src/provider/xlings/xlings.cpp 1
src/runtime/binding.cppm 4
src/runtime/elf.cppm 2
src/toolchain/base_probe.cppm 4
src/toolchain/clang.cpp 2
src/toolchain/clang.cppm 2
src/toolchain/post_install.cppm 3
src/toolchain/registry.cppm 2
4 changes: 2 additions & 2 deletions .github/tools/stderr-writers.baseline
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# One line per source file that writes to standard error without mcpp.ui or mcpp.log: its count
# (.github/tools/check_stderr_writers.sh). The numbers only fall.
src/build/execute.cppm 47
src/build/execute.cppm 44
src/build/schedule/compiler_transaction.cppm 1
src/build/schedule/detach_codegen.cppm 41
src/cli/cmd_build.cppm 53
Expand All @@ -17,4 +17,4 @@ src/fallback/xlings_binary.cppm 4
src/main.cpp 1
src/pack/distribution.cppm 5
src/publish/pipeline.cppm 6
src/run/run.cpp 6
src/run.cppm 6
5 changes: 2 additions & 3 deletions .github/workflows/bootstrap-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ jobs:
env:
XLINGS_NON_INTERACTIVE: '1'
# Dormant (workflow_dispatch only), but kept in step with the rest —
# check_version_pins.sh holds it there. Floor: 0.4.69, below which the
# index cannot resolve two packages that share a short name.
XLINGS_VERSION: '2026.12.5.2'
# check_version_pins.sh holds it there; the pin is also the floor.
XLINGS_VERSION: '2026.12.5.3'
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-aarch64-fresh-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
branches: [ main ]
paths:
- 'src/build/build_program.cppm'
- 'src/run/run.cpp'
- 'src/run.cppm'
- 'tests/e2e/168_build_mcpp_musl_host_static.sh'
- '.github/workflows/ci-aarch64-fresh-install.yml'
push:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
os: [ubuntu-24.04, macos-15, windows-2025]
env:
XLINGS_NON_INTERACTIVE: '1'
XLINGS_VERSION: '2026.12.5.2'
XLINGS_VERSION: '2026.12.5.3'
steps:
- uses: actions/checkout@v4

Expand All @@ -50,7 +50,7 @@ jobs:
shell: bash
run: |
set -euo pipefail
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.2
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.3
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
echo "$HOME/.xlings/bin" >> "$GITHUB_PATH"

Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
shell: bash
run: |
set -euo pipefail
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.2
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.3
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"

- name: Install the newest release and build the tree with it (mcpp build --strict)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-fresh-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
env:
XLINGS_NON_INTERACTIVE: '1'
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.2
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.3
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"

- name: Install mcpp and config mirror
Expand Down Expand Up @@ -321,7 +321,7 @@ jobs:

- name: Install xlings + mcpp
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.2
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.3
# Deliberately NOT writing to $GITHUB_PATH here. On container
# images that declare no PATH in their config (opensuse/
# tumbleweed), appending a single dir to GITHUB_PATH makes the
Expand Down Expand Up @@ -470,7 +470,7 @@ jobs:
# (older ones carry minos=15 and refuse to start).
# v0.4.51+: in-process sha256 — this image has no sha256sum
# binary, so pinned fetches failed before it.
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.2
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.3
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"

- name: Install mcpp and config mirror
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-linux-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ jobs:

- name: Bootstrap xlings + released mcpp
run: |
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.2
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s v2026.12.5.3
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xlings update
xlings install mcpp -y -g
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
run: echo 'APPLE_FLOAT_MACROS=-DINFINITY=HUGE_VALF -DNAN=__builtin_nanf("0x7fc00000")' >> "$GITHUB_ENV"

# THE SDK mcpp'S OWN RESOLUTION NAMES: `xcrun --show-sdk-path`
# (modules/toolchain-model/src/apple_sdk.cpp). These raw compiles state the
# (modules/toolchain-model/src/apple_sdk.cppm). These raw compiles state the
# SDK the same way, on purpose.
#
# On the 22.1.8 line this was the known-red spot (mcpp#669 has the
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/cross-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,9 @@ jobs:
# Must equal `pinned::kXlingsVersion` (src/provider/xlings/xlings.cppm) and the
# xlings the release bundles — enforced by
# .github/tools/check_version_pins.sh.
#
# Floors worth remembering. 0.4.67 carried the
# multi-index_repo install fix (openxlings/xlings#374); 0.4.68 adds
# per-repo index artifact sources (openxlings/xlings#377) so the
# mcpplibs index syncs via artifact with git as fallback (mcpp#269);
# 0.4.69 keys the index by (namespace, name) so two packages sharing
# a short name in ONE index are both addressable (openxlings/xlings#381)
# — the floor for SPEC-001 short-name descriptors.
# A past 0.4.61 "download 404
# for mcpp@<pin>" was NOT a version bug — the xlings-res/mcpp GitHub
# release assets were uploaded in a broken state (records present,
# blobs missing → 404 on GET); re-uploaded clean. The stale-INDEX
# half is handled by the marker-clear below.
XLINGS_VERSION: '2026.12.5.2'
# The floor is the pin itself; the pin's comment in xlings.cppm
# states what each floor added.
XLINGS_VERSION: '2026.12.5.3'
run: |
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
bash "$GITHUB_WORKSPACE/.github/tools/fetch_release.sh" \
Expand Down Expand Up @@ -257,7 +246,7 @@ jobs:
- name: Bootstrap mcpp via xlings
env:
XLINGS_NON_INTERACTIVE: '1'
XLINGS_VERSION: '2026.12.5.2'
XLINGS_VERSION: '2026.12.5.3'
run: |
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
bash "$GITHUB_WORKSPACE/.github/tools/fetch_release.sh" \
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
# Pin xlings to a known-good version. The upstream install
# script always grabs `latest` (no version override), so we
# download + self-install manually to avoid broken releases.
XLINGS_VERSION: '2026.12.5.2'
XLINGS_VERSION: '2026.12.5.3'
run: |
# BY VERSION, NOT BY PRESENCE. A restored ~/.xlings holds the
# xlings of an earlier release, and this binary is the one the
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
- name: Bootstrap mcpp via xlings
env:
XLINGS_NON_INTERACTIVE: '1'
XLINGS_VERSION: '2026.12.5.2'
XLINGS_VERSION: '2026.12.5.3'
run: |
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
bash "$GITHUB_WORKSPACE/.github/tools/fetch_release.sh" \
Expand Down Expand Up @@ -383,7 +383,7 @@ jobs:
# below are pinned to the same version as XLINGS_VERSION; they are
# NOT interpolated from it, so check_version_pins.sh scans for them
# explicitly (they were absent from the old lock-step comment).
XLA="xlings-2026.12.5.2-linux-aarch64.tar.gz"
XLA="xlings-2026.12.5.3-linux-aarch64.tar.gz"
# NOT fetch_release.sh: this asset is OPTIONAL and the `if` is the
# point — an arch with no prebuilt xlings must fall through quietly,
# while the helper retries a 404 five times before giving up. The one
Expand All @@ -392,9 +392,9 @@ jobs:
# cover it.
if curl -fsSL --retry 3 --retry-delay 2 --retry-all-errors \
--connect-timeout 20 --max-time 600 -o "/tmp/$XLA" \
"https://github.com/openxlings/xlings/releases/download/v2026.12.5.2/$XLA"; then
"https://github.com/openxlings/xlings/releases/download/v2026.12.5.3/$XLA"; then
tar -xzf "/tmp/$XLA" -C /tmp
XLBIN=$(find /tmp/xlings-2026.12.5.2-linux-aarch64 -path '*/bin/xlings' -type f | head -1)
XLBIN=$(find /tmp/xlings-2026.12.5.3-linux-aarch64 -path '*/bin/xlings' -type f | head -1)
if [ -n "$XLBIN" ]; then
mkdir -p "$STAGING/$WRAPPER/registry/bin"
cp "$XLBIN" "$STAGING/$WRAPPER/registry/bin/xlings"
Expand Down Expand Up @@ -467,7 +467,7 @@ jobs:
- name: Bootstrap mcpp via xlings
env:
XLINGS_NON_INTERACTIVE: '1'
XLINGS_VERSION: '2026.12.5.2'
XLINGS_VERSION: '2026.12.5.3'
run: |
# By version, not by presence (see the Linux job).
have=$("$HOME/.xlings/subos/default/bin/xlings" --version 2>/dev/null | awk '{print $2}')
Expand Down Expand Up @@ -653,7 +653,7 @@ jobs:
shell: bash
env:
XLINGS_NON_INTERACTIVE: '1'
XLINGS_VERSION: '2026.12.5.2'
XLINGS_VERSION: '2026.12.5.3'
run: |
# Captured before the `cd` below, in POSIX form: this step never
# returns to the workspace, and GITHUB_WORKSPACE is a backslash
Expand Down
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ CHANGELOG in the same pull request.
`.github/tools/check_modules_wiring.sh` checks.
- `import std;` and `import mcpp.<x>;`. An import names the module that defines a type, not one that
forwards it.
- A `.cppm` states its exported interface first; non-exported declarations, every implementation
and the imports only they need follow `module :private;`, and an implementation unit is folded in
([contributing](.agents/skills/mcpp-contributing/SKILL.md) states the exceptions).
- Follow the neighbouring code; change only what the task needs. Loops nest at most two levels.
Files under the prepare decomposition stay under 2,500 lines and functions under ~400.
- A comment states why, from what was measured, not what the next line does.
Expand Down
Loading
Loading