Skip to content

Commit eafe41f

Browse files
Follow openkal 0.8, and record why the five new interfaces are absent (#8)
* ci: 把引导阶段绑定指名的 glibc 载荷装给它(过渡步骤) `xim:glibc` 的 `latest` 从 `2.44` 移到了 `2.44.2`。载荷目录按请求**解析成**的版本 命名,而 RuntimeBinding 带的是**声明的**版本 —— 而一个已发布的 mcpp vendor 进自己 沙箱的那份 xlings 仍然声明 `2.44`。于是干净机器装出 `2.44.2`,工具链 fixup 要 `2.44`,构建在编译任何东西之前就停住: error: selected RuntimeBinding glibc@2.44 requires payload '.../xpkgs/xim-x-glibc/2.44', but it is not installed ⚠️ 在每一台**新**机器上出现,在任何已存在的机器上都不出现 —— 所以开发机看不见。 索引的 `pkgs/g/glibc.lua` 把这次失败逐字记着,并给出规则: 「The index is DATA and the client is a PROGRAM: the consumer ships first。」 ## ⚠️ 我先试过 bump xlings,撤回了 把 `XLINGS_VERSION` 提到 2026.8.27.1 会让**沙箱里那份** xlings 被换掉 (mcpp 的 `acquire_xlings_binary` 在 pin 前移时更新它),绑定于是**前移**到 `glibc@2.44.2`,而已经装好的是 `2.44` —— 请求比已装的**更新**。那是更糟的一侧: 接受一个更旧的载荷去回答更新的请求,等于静默用上索引明说 「IT IS NOT THE ONE TO INSTALL」的那份(带 mcpp#484 的 preload 缺陷)。 ⇒ 保持 xlings 不动,把缺的那个载荷直接装上。 ⭐ 待 mcpp 2026.8.27.1(mcpp-community/mcpp#515)发布后移除:它接受 「版本精化了请求」的已装载荷,从它引导就不需要这一步。 * Follow openkal 0.8, and record why the five new interfaces are absent This machine provides none of them, and each absence has a reason rather than being an omission: no network for net and datagram, no memory management unit to copy an address space with for space, no second execution context to bound a wait against for timeout, and a console whose settings the firmware does not expose for terminal. Clause 6.1 makes an interface an implementation does not provide absent at the link, so a program requiring one is refused when it is built rather than when it runs. The README states this beside the reasons already recorded for fs, process and task, so that a reader asking why finds the answer where the other answers are. * examples: name openkal the way this repository does mcpp refuses a graph in which one package reaches a dependency by version and another by git: dependency 'mcpplibs.openkal' is requested as both a version dep (by 'hello') and a git dep (by 'mcpplibs.openkal-<this>@path'). Pick one. That is the right refusal --- two forms can name two different trees --- and it means an example inside a repository must follow that repository's own declaration while a change spanning repositories is in flight. The example named a released version while the package beside it followed a branch. * Name the released specification and the released engine openkal 0.8.0 is published and resolvable from the index, so the manifest names it by version rather than by branch --- including the example's, where a branch would hand a reader a reference that moves. The engine pin moves to mcpp 2026.8.27.1 and the repository variable MCPP_SOURCE_REF is cleared, so what this repository tests is the engine a user installs. --------- Co-authored-by: speak-agent <x.d2learn.org@gmail.com>
1 parent a77b7d6 commit eafe41f

4 files changed

Lines changed: 81 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-24.04
2020
timeout-minutes: 40
2121
env:
22-
MCPP_VERSION: 2026.8.26.2
22+
MCPP_VERSION: 2026.8.27.1
2323
XLINGS_VERSION: v2026.8.17.2
2424
XLINGS_NON_INTERACTIVE: '1'
2525
steps:
@@ -70,6 +70,34 @@ jobs:
7070
echo "the index has not caught up yet (attempt $attempt of 6); waiting 60s"
7171
sleep 60
7272
done
73+
# ⚠️⚠️ TRANSITION: GIVE THE BOOTSTRAP THE glibc ITS BINDING NAMES.
74+
#
75+
# `xim:glibc`'s `latest` moved from `2.44` to `2.44.2`. A payload
76+
# directory is named after the version a request RESOLVED to, while a
77+
# RuntimeBinding carries the version that was DECLARED — and the xlings
78+
# a released mcpp vendors into its own sandbox still declares `2.44`.
79+
# So a clean machine installs `2.44.2`, the toolchain fixup asks for
80+
# `2.44`, and the build stops before anything is compiled:
81+
#
82+
# error: selected RuntimeBinding glibc@2.44 requires payload
83+
# '…/xpkgs/xim-x-glibc/2.44', but it is not installed
84+
#
85+
# ⚠️ On every NEW machine and on none that already existed, which is why
86+
# it is invisible from a developer's own. Measured on `main` as readily
87+
# as on any branch — the index records the same failure verbatim in
88+
# `pkgs/g/glibc.lua` and states the rule it broke: "The index is DATA
89+
# and the client is a PROGRAM: the consumer ships first."
90+
#
91+
# ⭐ REMOVE THIS once a released mcpp resolves it. `mcpp 2026.8.27.1`
92+
# accepts an installed payload whose version REFINES the requested one
93+
# (`payload_dir_for_version`), so a bootstrap from it needs nothing
94+
# here. Until then the missing payload is simply installed.
95+
if [ -x "$HOME/.mcpp/registry/bin/xlings" ]; then
96+
XLINGS_HOME="$HOME/.mcpp/registry" XLINGS_NON_INTERACTIVE=1 \
97+
"$HOME/.mcpp/registry/bin/xlings" install glibc@2.44 -y -g \
98+
>/dev/null 2>&1 || true
99+
echo "glibc payloads present: $(ls "$HOME/.mcpp/registry/data/xpkgs/xim-x-glibc" 2>/dev/null | tr '\n' ' ')"
100+
fi
73101
mcpp --version
74102
mcpp self config --mirror GLOBAL
75103
# ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE.
@@ -206,7 +234,7 @@ jobs:
206234
run:
207235
shell: bash
208236
env:
209-
MCPP_VERSION: 2026.8.26.2
237+
MCPP_VERSION: 2026.8.27.1
210238
XLINGS_VERSION: v2026.8.17.2
211239
XLINGS_NON_INTERACTIVE: '1'
212240
steps:
@@ -267,6 +295,34 @@ jobs:
267295
echo "the index has not caught up yet (attempt $attempt of 6); waiting 60s"
268296
sleep 60
269297
done
298+
# ⚠️⚠️ TRANSITION: GIVE THE BOOTSTRAP THE glibc ITS BINDING NAMES.
299+
#
300+
# `xim:glibc`'s `latest` moved from `2.44` to `2.44.2`. A payload
301+
# directory is named after the version a request RESOLVED to, while a
302+
# RuntimeBinding carries the version that was DECLARED — and the xlings
303+
# a released mcpp vendors into its own sandbox still declares `2.44`.
304+
# So a clean machine installs `2.44.2`, the toolchain fixup asks for
305+
# `2.44`, and the build stops before anything is compiled:
306+
#
307+
# error: selected RuntimeBinding glibc@2.44 requires payload
308+
# '…/xpkgs/xim-x-glibc/2.44', but it is not installed
309+
#
310+
# ⚠️ On every NEW machine and on none that already existed, which is why
311+
# it is invisible from a developer's own. Measured on `main` as readily
312+
# as on any branch — the index records the same failure verbatim in
313+
# `pkgs/g/glibc.lua` and states the rule it broke: "The index is DATA
314+
# and the client is a PROGRAM: the consumer ships first."
315+
#
316+
# ⭐ REMOVE THIS once a released mcpp resolves it. `mcpp 2026.8.27.1`
317+
# accepts an installed payload whose version REFINES the requested one
318+
# (`payload_dir_for_version`), so a bootstrap from it needs nothing
319+
# here. Until then the missing payload is simply installed.
320+
if [ -x "$HOME/.mcpp/registry/bin/xlings" ]; then
321+
XLINGS_HOME="$HOME/.mcpp/registry" XLINGS_NON_INTERACTIVE=1 \
322+
"$HOME/.mcpp/registry/bin/xlings" install glibc@2.44 -y -g \
323+
>/dev/null 2>&1 || true
324+
echo "glibc payloads present: $(ls "$HOME/.mcpp/registry/data/xpkgs/xim-x-glibc" 2>/dev/null | tr '\n' ' ')"
325+
fi
270326
mcpp --version
271327
mcpp self config --mirror GLOBAL
272328
# ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ application is the only thing running, and an interface provided in part would
4343
be worse than one provided not at all — `import openkal.process;` does not
4444
resolve, which is the honest answer rather than a set of calls that always fail.
4545

46+
The five interfaces version 0.8 adds are absent by the same rule. UEFI has no
47+
process model to copy an address space within, so `space` is not provided; no
48+
second context to bound a wait against, so `timeout` is not; and while Boot
49+
Services do expose a network stack, this backend forwards only the protocols
50+
listed above, so `net` and `datagram` are not. `terminal` is absent because
51+
`SIMPLE_TEXT_OUTPUT_PROTOCOL` has no mode to read or set.
52+
53+
Clause 6.1 makes each absence a link-time absence, so a program requiring one of
54+
them is refused when it is built rather than when it runs.
55+
4656
## The three places this is not forwarding
4757

4858
**Text.** openkal streams carry bytes; UEFI's console takes UCS-2 and treats a

examples/hello/mcpp.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,15 @@ target = "x86_64-windows-gnu"
1111
ldflags = ["-nostdlib", "-Wl,--subsystem,10", "-Wl,-e,efi_main"]
1212

1313
[dependencies]
14-
openkal = "0.7.0"
14+
# ⚠️ THE FORM MUST MATCH THE ONE THE IMPLEMENTATION USES, not merely the
15+
# version. mcpp refuses a graph in which one package reaches a dependency by
16+
# version and another by git:
17+
#
18+
# dependency 'mcpplibs.openkal' is requested as both a version dep
19+
# (by 'hello') and a git dep (by 'mcpplibs.openkal-uefi@path').
20+
#
21+
# That is the right refusal --- two forms can name two different trees --- and
22+
# it means an example inside a repository follows that repository's own
23+
# declaration while a change is in flight.
24+
openkal = "0.8.0"
1525
openkal-uefi = { path = "../.." }

mcpp.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
[package]
1616
namespace = "mcpplibs"
1717
name = "openkal-uefi"
18-
version = "0.1.3"
18+
version = "0.2.0"
1919
description = "An implementation of openkal on UEFI Boot Services, for applications the firmware loads before an operating system exists"
2020
license = "Apache-2.0"
2121

@@ -32,7 +32,7 @@ authors = ["mcpplibs"]
3232
repo = "https://github.com/mcpplibs/openkal-uefi"
3333

3434
[dependencies]
35-
openkal = "0.7.0"
35+
openkal = "0.8.0"
3636

3737
[build]
3838
flags = [

0 commit comments

Comments
 (0)