Skip to content

Commit 4d1748a

Browse files
committed
the label under a missing interface read as the claim the refusal denies
The refusal listed what the implementation does not provide and then, directly beneath it, said: openkal.space provided by fakekernel (2 interfaces) which parses as "openkal.space is provided by fakekernel" --- the statement this refusal exists to deny. It now reads "the resolved implementation is fakekernel (2 interfaces), and none of those listed above is among them". EVERY ASSERTION ON THIS MESSAGE MATCHED AN IDENTIFIER, and an identifier sits in the right place under either wording: `grep -q fakekernel` is true of the sentence that says the opposite. e2e 743 now asserts the clause and rejects the old label explicitly; restoring it fails leg B and only leg B. This is the same shape as the missing parenthesis in the absence note, found the same way --- by rendering the message and reading it. The other five diagnostics this release adds were rendered too, and read correctly: `absent` written inside `[c-abi]` (which names the top-level spelling), `[c-abi-absent]` on a package that supplies no C library, an unknown `form`, a row that is not a table, and a table that is not a table.
1 parent de49198 commit 4d1748a

3 files changed

Lines changed: 41 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ tcsetattr = { form = "accepted-no-effect", note = "openkal 不命名的那些字
105105
的东西。链接点到 `link` 形状里的某一项时,mcpp 把清单读回来:`undefined reference to
106106
'fork'` 因此带着那句说明它是缺陷还是环境限制的话一起到达。
107107

108+
**同一形状的第二处:拒绝消息里那行标签可以被读成它所否认的那句话。** 缺失的接口列在
109+
上面,紧接着一行 `provided by fakekernel (2 interfaces)`——读起来正是
110+
「openkal.space 由 fakekernel 提供」,而这条拒绝存在的理由恰恰是它**没有**提供。改成
111+
「the resolved implementation is fakekernel (2 interfaces), and none of those listed
112+
above is among them」。e2e 743 此前的每一条断言都只匹配**标识符**,而标识符在两种措辞下
113+
都在正确的位置;现在它断言整句,并显式拒绝旧措辞。
114+
108115
**这条说明此前少一个右括号,而九个单测都没看见。** 渲染出来是
109116
`the C library in this graph (musl declares that it does not supply ...`——C 库的名字由
110117
**两个各自独立的条件**插进去:一个左括号,然后是名字,右括号从来没有被发出过。单测断言的

src/build/prepare.cppm

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11241,10 +11241,20 @@ prepare_build(bool print_fingerprint,
1124111241
// asked for" from "the member did not build" on exactly this
1124211242
// token, and that distinction decides whether a member counts
1124311243
// against a compatibility figure.
11244+
// THE LABEL SAYS WHICH IMPLEMENTATION WAS RESOLVED, NOT
11245+
// "provided by". The missing names are listed immediately
11246+
// above it, and `provided by fakekernel` under `openkal.space`
11247+
// reads as the statement that fakekernel provides it --- the
11248+
// exact opposite of what this refusal is about. Read once,
11249+
// rendered, which is the only way that kind of defect is
11250+
// visible: every assertion on this message matches an
11251+
// identifier inside it, and an identifier is in the right
11252+
// place under either wording.
1124411253
return std::unexpected(std::format(
1124511254
"'{}' requires interfaces the resolved implementation does "
1124611255
"not provide. [interface-not-provided]{}\n"
11247-
" provided by {} ({} interface{})\n"
11256+
" the resolved implementation is {} ({} interface{}), "
11257+
"and none of those listed above is among them.\n"
1124811258
" This is refused before anything is compiled "
1124911259
"because dependency resolution is the earliest time the "
1125011260
"question can be answered. Select an implementation that "

tests/e2e/743_kernel_abi_interfaces_are_resolved_not_preprocessed.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,29 @@ echo "$out" | grep -q "fakekernel" || {
134134
echo "$out" >&2
135135
exit 1
136136
}
137+
# AND THE SENTENCE AROUND THOSE NAMES, NOT ONLY THE NAMES. Every assertion
138+
# above matches an identifier, and an identifier sits in the right place under
139+
# a wording that says the opposite. This message used to read
140+
#
141+
# openkal.net
142+
# provided by fakekernel (2 interfaces)
143+
#
144+
# --- the missing name, and directly beneath it a line that parses as
145+
# "openkal.net is provided by fakekernel", which is what the refusal exists to
146+
# deny. Nothing caught it because `grep -q fakekernel` is true either way.
147+
echo "$out" | grep -q "the resolved implementation is fakekernel" || {
148+
echo "FAIL: the line naming the implementation must say that it is the" \
149+
"one that was RESOLVED. Placed under the missing interface with a" \
150+
"'provided by' label, it reads as the statement this refusal denies." >&2
151+
echo " got: $(echo "$out" | grep -m1 'fakekernel')" >&2
152+
exit 1
153+
}
154+
echo "$out" | grep -qi "provided by *fakekernel" && {
155+
echo "FAIL: 'provided by fakekernel' directly under the missing interface" \
156+
"states the opposite of this refusal" >&2
157+
echo "$out" >&2
158+
exit 1
159+
}
137160
# AND THE CODE, BECAUSE SOMETHING READS THIS. mcpp-index's compatibility
138161
# measurement tells "this graph does not supply what the member asked for"
139162
# from "the member did not build" on this token; without it that consumer has

0 commit comments

Comments
 (0)