Skip to content

Commit 9ef9720

Browse files
Sunrisepeakclaude
andauthored
0.15.0 --- the interfaces this implementation provides are stated, and the statement is the artefact's own answer (#29)
* 0.15.0 --- the interfaces this implementation provides are stated, and the statement is the artefact's own answer openkal's specification names no set of interfaces: clause 3.3 withdrew the one it had named (`hosted`) because a name describing a class of environment is falsified by an environment nobody had in mind, and that one was falsified inside its own ecosystem within a release. Enumeration by the package replaced it, and a build tool reads the array at dependency resolution against the `requires-interfaces` a consumer states --- the first of the three times clause 6.2 tabulates, and the earliest at which "may this program be built against this implementation" can be answered. `[kernel-abi] provides-interfaces` lists the fifteen this implementation provides. It is GENERATED, by `check-surface.sh --toml`, and CI regenerates and diffs it against the objects. That is not a second derivation of the same fact: it is clause 9's surface comparison stopped one step earlier, so the list and the check can never answer differently. A declaration derived from the thing it describes cannot disagree with it, and an implementation that gains an interface cannot forget to say so. Backward compatible: an engine that predates the key reads `[kernel-abi]` as an unknown top-level table and ignores it, so this manifest loads unchanged everywhere it loaded before, and the absence of the resolution-time check is the behaviour that release already had. Co-authored-by: Claude Code <noreply@anthropic.com> * ci: re-run against the specification branch of the same name openkal-linux's CI checks the specification out at a branch matching this one where it exists, which is how a cross-repository change is measured before either half merges. The specification's --toml mode lives on that branch. --------- Co-authored-by: Claude Code <noreply@anthropic.com>
1 parent f5ca3ed commit 9ef9720

2 files changed

Lines changed: 69 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,29 @@ jobs:
221221
bash .spec/tools/check-surface.sh --complete .spec/SURFACE.txt \
222222
$(find target -path '*/obj/*' -name '*.o' ! -name '*.m.o' ! -name 'conformance*' | tr '\n' ' ')
223223
224+
- name: The manifest's provides-interfaces is what the artefact provides
225+
run: |
226+
set -euo pipefail
227+
# The array in mcpp.toml is a declaration, and a declaration is
228+
# checked rather than trusted. The check is clause 9's surface
229+
# comparison stopped one step earlier: the walk that decides whether
230+
# each group is exported whole already answers which interfaces this
231+
# implementation provides. Regenerating and diffing is therefore not
232+
# a second derivation --- it is the same one.
233+
objs=$(find target -path '*/obj/*' -name '*.o' ! -name '*.m.o' ! -name 'conformance*' | tr '\n' ' ')
234+
[ -n "$objs" ] || { echo "::error::no objects to examine"; exit 1; }
235+
bash .spec/tools/check-surface.sh --toml .spec/SURFACE.txt $objs > /tmp/derived.toml
236+
# The manifest's own block, normalised the same way: the array body
237+
# between `provides-interfaces = [` and the closing bracket.
238+
awk '/^provides-interfaces = \[/{p=1} p{print} /^\]/{if(p)exit}' mcpp.toml > /tmp/declared.toml
239+
if ! diff -u /tmp/declared.toml /tmp/derived.toml; then
240+
echo "::error::mcpp.toml's provides-interfaces disagrees with the artefact"
241+
echo " regenerate it with:"
242+
echo " bash .spec/tools/check-surface.sh --toml .spec/SURFACE.txt \$(find target -name '*.o')"
243+
exit 1
244+
fi
245+
echo " ok the declaration is the artefact's own answer"
246+
224247
- name: The C++ declarations are complete
225248
run: |
226249
# The specification's own tool examines the C form. The module form is

‎mcpp.toml‎

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
namespace = "mcpplibs"
33
name = "openkal-linux"
4-
version = "0.14.0"
4+
version = "0.15.0"
55
description = "The reference implementation of openkal for Linux, written on the kernel's own system-call interface so that it can be placed beneath a C library as well as above one."
66
license = "Apache-2.0"
77

@@ -17,6 +17,51 @@ provides = ["mcpp:kernel-abi=openkal"]
1717
authors = ["mcpplibs"]
1818
repo = "https://github.com/mcpplibs/openkal-linux"
1919

20+
# WHICH INTERFACES THIS IMPLEMENTATION PROVIDES, DERIVED FROM THE ARTEFACT AND
21+
# NOT WRITTEN BY HAND.
22+
#
23+
# openkal's specification names no set of interfaces: clause 3.3 withdrew the
24+
# one it had named (`hosted`) because a name describing a class of environment
25+
# is falsified by an environment nobody had in mind, and that one was falsified
26+
# inside its own ecosystem within a release. Enumeration by the package
27+
# replaced it, and a build tool reads this array at dependency resolution
28+
# against the `requires-interfaces` a consumer states in its own manifest --
29+
# the first of the three times clause 6.2 tabulates, and the earliest at which
30+
# the question can be answered.
31+
#
32+
# GENERATED, AND CI DIFFS IT AGAINST THE OBJECTS:
33+
#
34+
# bash openkal/tools/check-surface.sh --toml openkal/SURFACE.txt \
35+
# $(find target -name '*.o')
36+
#
37+
# A declaration derived from the thing it describes cannot disagree with it,
38+
# and an implementation that gains an interface cannot forget to say so. The
39+
# same walk is clause 9's surface comparison stopped one step earlier, so this
40+
# list and that check can never answer differently.
41+
#
42+
# BACKWARD COMPATIBLE. An engine that predates the key reads `[kernel-abi]` as
43+
# an unknown top-level table and ignores it, so this manifest loads unchanged
44+
# everywhere it loaded before; the absence of the check is the behaviour that
45+
# release already had.
46+
[kernel-abi]
47+
provides-interfaces = [
48+
"openkal.abort",
49+
"openkal.stream",
50+
"openkal.memory",
51+
"openkal.env",
52+
"openkal.time",
53+
"openkal.random",
54+
"openkal.fs",
55+
"openkal.process",
56+
"openkal.task",
57+
"openkal.exec",
58+
"openkal.terminal",
59+
"openkal.net",
60+
"openkal.datagram",
61+
"openkal.space",
62+
"openkal.timeout",
63+
]
64+
2065
[dependencies]
2166
openkal = "0.14.0"
2267

0 commit comments

Comments
 (0)