Skip to content

Commit 873c5dc

Browse files
committed
ci: the table assertion was the defect, and WiX 7 will not run at all
TWO CI FAILURES, TWO DIFFERENT KINDS. THE LINUX ONE WAS THE CHECK, NOT THE CODE. It grepped for `struct embedded_file`, which is the DEFAULT `row_type` -- while the fixture sets `row_type = "shader_entry"` precisely because that option exists. So the assertion failed with the code correct, which is what a check tied to a spelling the fixture chooses will eventually always do. It now reads the struct's name out of the file and asserts that the table's element type IS that struct, for every generated header rather than whichever `find` listed first -- this fixture writes three, and `head -1` was asserting about a file nothing chose. THE WINDOWS ONE WAS A TOOL THAT REFUSES TO RUN. An unpinned `dotnet tool install wix` gets v7: wix.exe : error WIX7015: You must accept the Open Source Maintenance Fee (OSMF) EULA to use WiX Toolset v7. A runtime gate, not a redistribution term -- 6's own EULA permits redistributing binaries under the Microsoft Reciprocal License. So 6.0.2 is the version this ecosystem can drive, and the version `xim:wix` should carry when that package lands: one pinning 7 would install a tool that cannot run. The dispatch itself was already correct when this failed, which is why the fix is a pin. The same run reported `Distributing msi-consumer v0.3.0 (--format msi)` and the full `wix.exe build -arch x64 -d Executable=... MsiConsumer.wxs` argv, so the `.wxs` was rendered and the request reached the member. Only the tool declined. The macOS lane stays red for a third, unrelated reason -- `error: cannot package the Mach-O program 'app-consumer' yet`, which mcpp 2026.9.11.2 fixes (staging is a service to the provider, not a precondition for dispatch). That one needs the engine release and a `MCPP_VERSION` bump, not a change here.
1 parent 9f53a82 commit 873c5dc

2 files changed

Lines changed: 63 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 62 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -951,19 +951,41 @@ jobs:
951951
grep -q '^row 0: key=Standard.vert size=20' run.log
952952
grep -q '^row 1: key=Standard.frag size=22' run.log
953953
grep -q '^all ok' run.log
954-
# The bytes are a numeric array and never a raw string literal: a
955-
# raw literal cannot carry arbitrary binary, and its delimiter is
956-
# terminable by the input. The CMake code this shape replaces used
957-
# string concatenation and has exactly that defect.
958-
h=$(find target/.build-mcpp/out -name '*.h' | head -1)
959-
test -n "$h" || { echo "FAIL: no generated header"; exit 1; }
960-
if grep -q 'R"' "$h"; then
961-
echo "FAIL: the table emitted a raw string literal"; exit 1
962-
fi
963-
# Self-contained: the row type is declared beside the array, so the
964-
# header compiles on its own with nothing else included.
965-
grep -q 'struct embedded_file' "$h" \
966-
|| { echo "FAIL: the row type is not in the header"; head -30 "$h"; exit 1; }
954+
# EVERY GENERATED HEADER, NOT WHICHEVER `find` LISTED FIRST. This
955+
# fixture writes three -- the real table plus probes that exercise
956+
# `key_kind::relative_path` and `element::word32` -- and `head -1`
957+
# picked one by directory order, so the check was asserting about a
958+
# file nothing chose.
959+
mapfile -t headers < <(find target/.build-mcpp/out -name '*.h' | sort)
960+
[ "${#headers[@]}" -gt 0 ] || { echo "FAIL: no generated header"; exit 1; }
961+
echo "checking ${#headers[@]} generated header(s)"
962+
for h in "${headers[@]}"; do
963+
# The bytes are a numeric array and never a raw string literal: a
964+
# raw literal cannot carry arbitrary binary, and its delimiter is
965+
# terminable by the input. The CMake code this shape replaces used
966+
# string concatenation and has exactly that defect.
967+
if grep -q 'R"' "$h"; then
968+
echo "FAIL: $h emitted a raw string literal"; exit 1
969+
fi
970+
# SELF-CONTAINED, ASSERTED AS A PROPERTY AND NOT AS A NAME. The
971+
# row type is declared beside the array, so the header compiles on
972+
# its own. The first version grepped for `struct embedded_file`,
973+
# which is the DEFAULT `row_type` -- and this fixture sets
974+
# `row_type = "shader_entry"` precisely because that option
975+
# exists. So the assertion failed with the code correct, which is
976+
# what a check tied to a spelling the fixture chooses will
977+
# eventually always do.
978+
#
979+
# What is wanted: the header declares a struct, and the table's
980+
# element type IS that struct. Both read out of the file.
981+
row=$(sed -n 's/^struct \([A-Za-z_][A-Za-z0-9_]*\) {.*/\1/p' "$h" | head -1)
982+
test -n "$row" \
983+
|| { echo "FAIL: $h declares no row struct"; head -30 "$h"; exit 1; }
984+
grep -q "constexpr $row .*\[\] = {" "$h" \
985+
|| { echo "FAIL: $h's element type is not the struct it declares ($row)"
986+
head -40 "$h"; exit 1; }
987+
echo " ok: $(basename $h) declares '$row' and its table is an array of it"
988+
done
967989
echo "ok: N inputs, one header, one table"
968990
969991
# ── dist: what comes out of the LINK ────────────────────────────────
@@ -1499,7 +1521,33 @@ jobs:
14991521
# ecosystem, which is why the member LOCATES it rather than declaring
15001522
# a payload. Installing it here is the CI runner supplying what a
15011523
# developer's machine would.
1502-
dotnet tool install --global wix >/dev/null 2>&1 || dotnet tool update --global wix >/dev/null 2>&1
1524+
# WiX 6, PINNED, AND THE PIN IS THE WHOLE POINT.
1525+
#
1526+
# An unpinned `dotnet tool install wix` gets v7, which REFUSES TO RUN
1527+
# AT ALL until a licence is accepted out of band. Measured on
1528+
# windows-2022:
1529+
#
1530+
# wix.exe : error WIX7015: You must accept the Open Source
1531+
# Maintenance Fee (OSMF) EULA to use WiX Toolset v7.
1532+
#
1533+
# That is a runtime gate, not a licence term about redistribution: 6's
1534+
# own EULA states that binaries may be redistributed and that the
1535+
# source remains freely distributable under the Microsoft Reciprocal
1536+
# License. So 6 is the version this ecosystem can actually drive, and
1537+
# it is also the version `xim:wix` should carry when that package
1538+
# lands -- a package pinning 7 would install a tool that cannot run.
1539+
#
1540+
# THE DISPATCH WAS ALREADY CORRECT WHEN THIS FAILED, which is worth
1541+
# recording because it is why the fix is a version pin and not a code
1542+
# change. The same run reported
1543+
#
1544+
# Distributing msi-consumer v0.3.0 (--format msi)
1545+
# wix.exe build -arch x64 -d Executable=bin/msi-consumer.exe -o ... MsiConsumer.wxs
1546+
#
1547+
# so the `.wxs` was rendered, the argv was assembled and the engine
1548+
# handed the request to the member. Only the tool declined.
1549+
dotnet tool install --global wix --version 6.0.2 >/dev/null 2>&1 \
1550+
|| dotnet tool update --global wix --version 6.0.2 >/dev/null 2>&1
15031551
export PATH="$PATH:$HOME/.dotnet/tools"
15041552
wix --version
15051553

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ compile_commands.json
33
mcpp.lock
44
.mcpp/
55
*.log
6+
.worktrees/

0 commit comments

Comments
 (0)