Skip to content

Commit 7f28bd9

Browse files
committed
feat(huxerui): 0.3.0, and a CI pin that follows the engine
The descriptor and its member landed in the previous commit as a record of two blockers. One turned out not to be a blocker at all and the other is fixed here, so this completes the addition. THE OVERFLOW WAS THE MEASUREMENT, NOT THE PACKAGE The `hrc:builtin` action was reported as overflowing mcpp's fixed `inputs_[8192]`. It does -- at a 149-character unpack prefix. Measured across three path lengths, the same source and the same engine: 149 chars (deep local checkout) 8131 B + ~106 B overflows 109 chars (ordinary path) 6371 B builds in-tree, relative 1531 B builds, 21.45s So the trigger is the prefix, not the file count, and it clears at any ordinary checkout depth. It is still a real trap -- roughly 45 bytes of margin, decided by how deep a consumer's project sits -- and mcpp's own error names the fix (declare the resources DIRECTORY as one input rather than enumerating 44 files). That belongs in huxerui-build-rules and is filed there; working around it in this index would be the wrong place. THE PIN, WHICH IS A REAL BLOCKER AND MOVES HERE `mcpp/huxerui-build-rules` calls `mcpp::package_name()` and `mcpp::package_namespace()` -- mcpp#587, first released in v2026.9.7.1 -- so under the old 2026.9.6.3 pin the host module does not compile: rules.cppm:274:61: error: 'package_name' is not a member of 'mcpp' #361 established the pattern for exactly this, down to the reasoning: a package whose build program uses a current engine API is not a defect, a CI that cannot run current engines is. MCPP_VERSION moves to 2026.9.10.2. `index.toml` min_mcpp does NOT move, and that is verified rather than assumed: `mcpp xpkg parse` accepts this descriptor under 2026.8.27.2 (the floor), 2026.9.6.3 and 2026.9.10.2 alike. The floor is about descriptor grammar; only BUILDING this package needs the newer engine, so a client on the floor keeps resolving the whole index. VERIFIED mcpp test -p huxerui-module → test result ok. 1 passed same, on 2026.9.6.3 → 'package_name' is not a member assertion inverted → FAILED. 0 passed; 1 failed The last one matters: the test opens no window, and Rect/Color alone would compile even if libhuxerui had never been built. FlatLightThemeSpec and FlatDarkThemeSpec are out-of-line definitions inside the library, so reaching them is what proves the link -- and inverting the check proves the assertion is live. CN mirror mcpp-res/huxerui@0.3.0 is up and byte-identical to GLOBAL (http 200, 9946045 bytes, sha 8b326d95…). All five lint checks pass on the new descriptor, and the three repo-wide ones pass across pkgs/*/*.lua. The pin move pays the cold-cache cost the workflow comment warns about, so any other descriptor waiting on a newer engine should ride along.
1 parent 39cca3e commit 7f28bd9

4 files changed

Lines changed: 230 additions & 3 deletions

File tree

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# Adding `huxerui.huxerui` 0.3.0 to mcpp-index
2+
3+
> 2026-09-11 · Form A (shape D, external Form-A module repo) · PR: add HuxerUI + a CI pin that follows the engine
4+
5+
## 1. Shape
6+
7+
Source category (b) — a library developed **on** mcpp. Upstream carries its own
8+
`mcpp.toml` (`[lib] path = "modules/huxerui.cppm"`, `[build-dependencies]` for
9+
two code generators and a rule module, `build.mcpp` driving them), so this is
10+
**Form A**: the descriptor declares metadata plus a download address, and every
11+
build fact comes from the source's own manifest.
12+
13+
No `mcpp` segment. `mcpp emit xpkg` prints a table-form one aimed at the publish
14+
flow; pasting it here makes the parser read the descriptor as an **inline
15+
Form B** and refuse it:
16+
17+
```
18+
error: synthesised manifest missing sources (mcpp segment must declare `sources = { ... }`)
19+
```
20+
21+
Omitting it lets mcpp's default lookup find `<verdir>/*/mcpp.toml`, which the
22+
tag archive provides at `HuxerUI-0.3.0/mcpp.toml`. `imgui.lua` carries the same
23+
note. `mcpp xpkg parse` then reports `form A — no mcpp segment`.
24+
25+
## 2. Source and hash
26+
27+
v0.3.0's release publishes SDK **binaries** only — no source asset — so the
28+
url is GitHub's tag archive, the same form `imgui-m` uses:
29+
30+
```
31+
https://github.com/HuxerUI/HuxerUI/archive/refs/tags/v0.3.0.tar.gz
32+
sha256 8b326d95015e92925229fdc1ababe4fdf32515e75764472591645622c1cfbb08
33+
```
34+
35+
Downloaded twice, sha identical both times (9 946 045 bytes). Wrap layer is
36+
`HuxerUI-0.3.0/`, absorbed by the default lookup.
37+
38+
## 3. Two fields that deliberately disagree with `emit xpkg`
39+
40+
Emit produces `licenses = {"Apache-2.0"}` and
41+
`repo = "https://github.com/Sunrisepeak/HuxerUI"`. Both are wrong at the source:
42+
43+
* The v0.3.0 tree's `LICENSE` is the **MIT** License verbatim, and
44+
xim-pkgindex's entry for the same SDK has always said MIT. Upstream's
45+
`license = "Apache-2.0"` is a typo shared by seven manifests in that repo and
46+
is being corrected separately. An index must not restate a licence its own
47+
artifact contradicts.
48+
* `Sunrisepeak/HuxerUI` is the author's personal remote; the canonical
49+
repository — the one publishing the releases this descriptor downloads — is
50+
`HuxerUI/HuxerUI`.
51+
52+
The descriptor is therefore hand-maintained and does **not** carry emit's
53+
"AUTO-GENERATED / do not edit by hand" banner. Re-emitting over it would
54+
reintroduce both. (`aimol.tensorvia-cpu` is the cautionary case: it still
55+
carries that banner while having been hand-edited.)
56+
57+
Naming follows mcpp#278 (INV-NAME): `namespace = "huxerui"` **and** the
58+
fully-qualified `name = "huxerui.huxerui"`. The split form — namespace plus a
59+
bare name — parses but can never be installed.
60+
61+
## 4. `xpm.linux.deps`, and why it is written out by hand
62+
63+
Upstream declares the GTK4 stack on the **target axis**:
64+
65+
```toml
66+
[target.'cfg(linux)'.xlings.workspace]
67+
"xim:gtk4" = "4.16.13" # …36 entries, the transitive .pc closure
68+
```
69+
70+
which is the form mcpp recommends for anything the produced code links against,
71+
and which a descriptor structurally cannot carry. `emit xpkg` says exactly that:
72+
73+
```
74+
[target.'cfg(linux)'] declares tools (xim:cairo@1.18.4, …) and the descriptor
75+
carries no edge for them: its blocks are per platform, and a selector is not a
76+
platform.
77+
```
78+
79+
A descriptor has three platform blocks; a cfg selector is not one of them.
80+
Consumer edges therefore come from this file. Omitted, a consumer would resolve
81+
huxerui, build it, and die at link on the GTK sonames.
82+
83+
The closure is transcribed at **PLATFORM level** — a per-version `deps` is
84+
inert, the finding `compat.eui-neo` and `compat.glx-runtime` both record. All 36
85+
entries and their pins are copied verbatim from the v0.3.0 tag's own manifest
86+
(diffed against the working tree to confirm they match). They are what the
87+
package's build compiles against *and* what a consumer must have, so no
88+
`runtime = { … }` split applies.
89+
90+
Keeping this in step with upstream is manual until mcpp can derive consumer
91+
dependencies from the target axis. A missing entry surfaces as
92+
`Package <x> was not found in the pkg-config search path`, which names it.
93+
94+
macOS needs no payloads (`[runtime] frameworks`, supplied by the system SDK).
95+
windows keeps `xim:wix@5.0.2` exactly as emitted — upstream declares it on the
96+
host axis, because wix.exe runs on the build machine, and the host axis *is*
97+
emitted.
98+
99+
## 5. The CI pin moves with this PR
100+
101+
`mcpp/huxerui-build-rules` calls `mcpp::package_name()` and
102+
`mcpp::package_namespace()`mcpp#587, merged 2026-09-08, first released in
103+
**v2026.9.7.1**. The pin was 2026.9.6.3, one release short, so the host module
104+
did not compile at all:
105+
106+
```
107+
error: dependency 'huxerui': host module 'huxerui.rules' compile failed (exit 1)
108+
rules.cppm:274:61: error: 'package_name' is not a member of 'mcpp'
109+
```
110+
111+
This is the situation #361 established the pattern for — *"A package whose build
112+
program uses a current engine API is not a defect; a CI that cannot run current
113+
engines is."* — so `MCPP_VERSION` moves to **2026.9.10.2** (current) in the same
114+
PR, and the comment records why.
115+
116+
`index.toml` `min_mcpp` does **not** move, for the reason that entry gives: the
117+
floor is about descriptor **grammar**. Verified — `mcpp xpkg parse` accepts this
118+
descriptor under 2026.8.27.2 (the floor), 2026.9.6.3 and 2026.9.10.2 alike. A
119+
client on the floor keeps resolving the whole index; only building *this*
120+
package from source needs the newer engine.
121+
122+
The pin move pays the cold-cache cost the workflow comment warns about
123+
(~12 shards, still cold after 50 minutes), so any other descriptor waiting on a
124+
newer engine should ride along.
125+
126+
## 6. Verification
127+
128+
Member `tests/examples/huxerui-module`, one `[indices] huxerui = { path = "../../.." }`.
129+
130+
```
131+
$ mcpp test -p huxerui-module # 2026.9.10.2
132+
Compiling huxerui.huxerui v0.3.0
133+
Compiling runtime (test)
134+
Running bin/runtime
135+
runtime ... ok (0.02s)
136+
test result ok. 1 passed; 0 failed; finished in 8.21s
137+
```
138+
139+
Negative check — the assertion is live, not a no-op:
140+
141+
```
142+
$ sed -i 's/Color::Rgb(255, 128, 0)/Color::Rgb(1, 2, 3)/' …/runtime.cpp
143+
$ mcpp test -p huxerui-module
144+
runtime ... FAIL (exit 1, 0.02s)
145+
error: test result: FAILED. 0 passed; 1 failed
146+
```
147+
148+
The test deliberately opens no window. `Rect`/`Color` are header-attached
149+
entities the module re-exports and would compile even if the library had never
150+
been built; `FlatLightThemeSpec()`/`FlatDarkThemeSpec()` are out-of-line
151+
definitions inside libhuxerui, so reaching them is what proves the link.
152+
153+
Old pin still fails, as expected:
154+
155+
```
156+
$ mcpp-2026.9.6.3 test -p huxerui-module
157+
rules.cppm:274:61: error: 'package_name' is not a member of 'mcpp'
158+
```
159+
160+
## 7. A path-length trap found on the way, and left upstream
161+
162+
At a deep checkout the same member fails on **mcpp**, not on this descriptor:
163+
164+
```
165+
build.mcpp declared an action whose arguments did not fit
166+
payload: {"id":"hrc:builtin", … "overflow":true}
167+
```
168+
169+
`mcpp::action` uses fixed buffers (`inputs_[8192]`) and `hrc:builtin` enumerates
170+
all 44 files under `resources/` as inputs. Measured:
171+
172+
| unpack prefix | inputs | result |
173+
|---|---|---|
174+
| 149 chars (deep local checkout) | 8 131 B + ~106 B for the hrc path | **overflows 8 192** |
175+
| 109 chars (ordinary path) | 6 371 B | builds |
176+
| in-tree, relative | 1 531 B | builds, 21.45 s |
177+
178+
So it is driven by the unpack prefix, not the file count, and it overflows by
179+
roughly 45 bytes. That is worse than a clean failure: whether a consumer builds
180+
depends on how deep their project sits on disk. mcpp's own error names the fix —
181+
declare the resources **directory** as one input instead of enumerating it —
182+
and it belongs in `huxerui-build-rules`, not here. Filed as a follow-up against
183+
HuxerUI; this index is not the place to work around it.
184+
185+
## 8. CN mirror
186+
187+
`mcpp-res/huxerui`, release `0.3.0`, asset `huxerui-0.3.0.tar.gz` — the same
188+
bytes as GLOBAL.
189+
190+
```
191+
CN http=200 size=9946045
192+
GLOBAL sha 8b326d95015e92925229fdc1ababe4fdf32515e75764472591645622c1cfbb08
193+
CN sha 8b326d95015e92925229fdc1ababe4fdf32515e75764472591645622c1cfbb08
194+
BYTE-IDENTICAL
195+
```
196+
197+
## 9. Lint
198+
199+
`check_mirror_urls`, `check_package_name`, `check_duplicate_versions`,
200+
`check_platform_version_parity`, `check_cross_package_refs` — all pass on the
201+
new descriptor, and the first three pass across `pkgs/*/*.lua` to confirm the
202+
addition does not disturb anything else.

.github/workflows/validate.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,31 @@ env:
191191
# member on every platform. Measured: twelve workspace shards, all still cold
192192
# after fifty minutes. Batch descriptor changes that need a newer engine into
193193
# ONE pin move rather than several.
194-
MCPP_VERSION: "2026.9.6.3"
194+
# ── 2026-09-11: raised 2026.9.6.3 -> 2026.9.10.2 ──────────────────────────
195+
#
196+
# Same shape as the move above, and for the same reason. `huxerui.huxerui`
197+
# is a Form A package whose build program (`mcpp/huxerui-build-rules`) calls
198+
# `mcpp::package_name()` and `mcpp::package_namespace()`. Those are mcpp#587,
199+
# merged 2026-09-08 and first released in v2026.9.7.1 -- one release past the
200+
# old pin -- so under 2026.9.6.3 the host module does not compile at all:
201+
#
202+
# error: dependency 'huxerui': host module 'huxerui.rules' compile failed
203+
# rules.cppm:274:61: error: 'package_name' is not a member of 'mcpp'
204+
#
205+
# Verified at 2026.9.10.2: `mcpp test -p huxerui-module` builds the SDK from
206+
# source as an index dependency and the member's assertion passes
207+
# (`test result ok. 1 passed`), and the same member still fails on 2026.9.6.3
208+
# with the error above. Nothing else in this PR needs the newer engine.
209+
#
210+
# `index.toml` min_mcpp does NOT move, for the reason the previous entry
211+
# gives: the floor is about descriptor GRAMMAR, and `mcpp xpkg parse` accepts
212+
# pkgs/h/huxerui.huxerui.lua under 2026.9.6.3 and 2026.9.10.2 alike. A client
213+
# on the floor keeps resolving the whole index; only building THIS package
214+
# from source needs the newer engine.
215+
#
216+
# The batching guidance above applies: this move pays the cold-cache cost, so
217+
# any other descriptor waiting on a newer engine should ride along.
218+
MCPP_VERSION: "2026.9.10.2"
195219

196220
jobs:
197221
lint:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Two kinds of packages live here:
2727

2828
- **Native mcpp module libraries**: shipped as C++23 modules and ready to `import``mcpplibs.*`, `nlohmann.json`,
2929
`imgui`, `ffmpeg`, `opencv`, plus libraries developed on top of mcpp by users and registered into the index (such as
30-
`tensorvia-cpu`). Their upstream usually carries its own `mcpp.toml`, so the descriptor (Form A) only declares
30+
`tensorvia-cpu` and `huxerui.huxerui`). Their upstream usually carries its own `mcpp.toml`, so the descriptor (Form A) only declares
3131
metadata and a download address.
3232
- **Third-party C/C++ libraries (`compat`)**: upstream offers no mcpp support, so the descriptor (Form B) inlines the
3333
build information. These come in several shapes — header-only, plain C sources, C++23 module wrapper — with optional
@@ -47,6 +47,7 @@ A few descriptors worth opening first, one per common shape:
4747
| C++23 module wrapper | [`nlohmann.json`](pkgs/n/nlohmann.json.lua) | A generated `.cppm` turns a header-only library into `import` |
4848
| C++23 module, upstream's own | [`khronos.vulkan-hpp`](pkgs/k/khronos.vulkan-hpp.lua) | Khronos ships `vulkan.cppm`, so the descriptor just names it — `import vulkan;` with nothing authored here |
4949
| External build system | [`compat.openssl`](pkgs/c/compat.openssl.lua) | An `install()` hook drives upstream's own Perl Configure + Make |
50+
| Form A whose consumer deps must be written by hand | [`huxerui.huxerui`](pkgs/h/huxerui.huxerui.lua) | HuxerUI declares its GTK4 stack on the TARGET axis, which is the form mcpp recommends and which a descriptor structurally cannot carry — three platform blocks, and a cfg selector is not a platform. `mcpp emit xpkg` says so and emits empty `deps`, so the 36-entry closure is transcribed into `xpm.linux.deps` at PLATFORM level (a per-version `deps` is inert). Its `licenses`/`repo` also deliberately disagree with what emit produces |
5051

5152
The full catalog — every shape this index has needed, and the reasoning behind each descriptor including what it
5253
deliberately leaves out — is in **[Descriptor examples by shape](docs/descriptor-examples.md)**.

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mcpp self config --mirror CN # 切换至国内镜像,默认使用 GLOBAL 上
2525
本仓收录两类包:
2626

2727
- **原生 mcpp 模块库**:以 C++23 模块发布、`import` 即用,包括 `mcpplibs.*``nlohmann.json``imgui``ffmpeg``opencv`,以及由
28-
用户基于 mcpp 开发并登记进索引的库(如 `tensorvia-cpu`)。其上游通常自带 `mcpp.toml`,描述文件(Form A)只声明
28+
用户基于 mcpp 开发并登记进索引的库(如 `tensorvia-cpu``huxerui.huxerui`)。其上游通常自带 `mcpp.toml`,描述文件(Form A)只声明
2929
元数据与下载地址。
3030
- **第三方 C/C++ 库(`compat`)**:其上游不提供 mcpp 支持,描述文件(Form B)内联构建信息。该类库存在
3131
header-only、纯 C 源码、C++23 module wrapper 等形态,可选组件经 `features` 门控,并配备 GitCode CN 镜像。

0 commit comments

Comments
 (0)