Skip to content

Commit 6569c59

Browse files
committed
fix(ci): windows-2025 with the MSVC toolset pinned — both axes, not a trade
#385 pinned the windows leg to `windows-2022` to get past MSVC STL 14.51 rejecting `huxerui.huxerui`, and that pin cost three members: `vulkan`, `eui-neo-vulkan` and `vulkan-hpp-module` began failing at 0xC0000135. It was a trade, and it was avoidable. THE MISTAKE WAS TREATING ONE LABEL AS ONE AXIS A windows job depends on the image for two unrelated things, and both were being chosen with a single word: * the Vulkan LOADER — `vulkan-1.dll` is not a Windows component, it arrives with a GPU driver or the SDK. Measured: present on 2025 and on latest, ABSENT on 2022. * the MSVC STL clang compiles against — 14.51 instantiates a vectorized `std::find` for a 24-byte type and static_asserts (mcpp#609). Choosing an old image fixed the STL and lost the loader. They are separate axes and only looked joined because both were read off the label. The probe that settled it printed the image inventory before building anything, and the inventory is the finding: `windows-2025` carries THREE toolsets — 14.29.30133, 14.44.35207, 14.51.36231 — and clang simply takes the newest. SO: NEW IMAGE, OLD TOOLSET `windows-2025` for the loader, `VCToolsInstallDir` naming 14.44 for the STL. Measured on exactly that combination: mcpp test -p huxerui-module test result ok. 1 passed MSVC\14.44.35207 in the compile 6 occurrences MSVC\14.51.36231 0 The last two lines are the point. A pass alone would not distinguish "compiled against 14.44" from "compiled against 14.51 and got lucky", so the probe was built to report which STL the build actually reached. Both halves are pinned deliberately: the image because `latest` moves what is installed, the toolset because the image ships more than one and the newest is the broken one. The step throws when 14.44 is absent rather than letting a silent fallback to 14.51 return as the same static_assert three shards later, attributed to whichever descriptor changed that week — which is the failure mode the rolling label already produced here once.
1 parent 18dfa0b commit 6569c59

1 file changed

Lines changed: 51 additions & 29 deletions

File tree

‎.github/workflows/validate.yml‎

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -786,39 +786,37 @@ jobs:
786786
emit linux ubuntu-latest linux-x86_64 tar.gz bin/mcpp registry/bin/xlings default "$ln"
787787
emit linux ubuntu-latest linux-x86_64 tar.gz bin/mcpp registry/bin/xlings llvm "$lln"
788788
emit macos macos-15 macosx-arm64 tar.gz bin/mcpp registry/bin/xlings default "$mn"
789-
# WINDOWS IS PINNED, like macOS above, and for a reason that cost
790-
# a day to find. `windows-latest` rolled to the Visual Studio 18
791-
# image (MSVC STL 14.51), and mcpp builds windows with clang
792-
# targeting x86_64-pc-windows-msvc -- so every package here
793-
# compiles against an STL written for a different front end.
789+
# WINDOWS IS PINNED, like macOS above. `windows-latest` rolled to
790+
# the Visual Studio 2026 image and took two separate things with
791+
# it, which is why the first attempt at this pin was wrong.
794792
#
795-
# Most survive that. `huxerui.huxerui` did not:
793+
# THE TWO AXES. mcpp builds windows with clang targeting
794+
# x86_64-pc-windows-msvc, so a windows job depends on the image for
795+
# two unrelated things:
796796
#
797-
# xutility:320: error: static assertion failed: unexpected size
798-
# in instantiation of 'std::_Find_vectorized<
799-
# const huxerui::detail::NodeExtensionHandle, ...>'
797+
# * the Vulkan LOADER. `vulkan-1.dll` is not a Windows component
798+
# -- it arrives with a GPU driver or the SDK -- so `vulkan`,
799+
# `eui-neo-vulkan` and `vulkan-hpp-module` load it or fail at
800+
# 0xC0000135. Measured: present on 2025 and on latest, ABSENT
801+
# on 2022.
802+
# * the MSVC STL clang compiles against. 14.51 rejects
803+
# `huxerui.huxerui`: clang instantiates the vectorized
804+
# `std::find` for a 24-byte type and hits
805+
# `static_assert(false, "unexpected size")` in <xutility>
806+
# (mcpp-community/mcpp#609).
800807
#
801-
# MSVC STL's vectorized `std::find` is guarded by a trait that
802-
# decides whether the element type can be compared bitwise.
803-
# `NodeExtensionHandle` is 24 bytes with no padding, trivially
804-
# copyable, `operator==` defaulted -- the guard admits it under
805-
# clang, and the helper it dispatches to implements 1/2/4/8-byte
806-
# elements and static_asserts on the rest. Guard and implementation
807-
# disagree about what "vectorizable" means, and only clang is there
808-
# to notice.
808+
# Pinning to `windows-2022` answered the second and broke the
809+
# first -- a trade, not a fix. The two axes were assumed to move
810+
# together because both were read off the image label. They do not.
809811
#
810-
# NOT this index's bug, and not the package's: the same source, the
811-
# same clang, compiles on the 2022 image's STL. Upstream HuxerUI's
812-
# own mcpp CI is green for exactly that reason -- it pins
813-
# `windows-2022`. Reported as mcpp-community/mcpp#609 so the pin can
814-
# be lifted when the toolchain combination works.
815-
#
816-
# 13 of the 14 members on the shard that failed were unaffected, so
817-
# this is not a blanket breakage -- which is precisely why a rolling
818-
# label is the wrong thing to stand on: the next image moves the set
819-
# of packages that happen to trip it, and the failure arrives
820-
# attributed to whatever descriptor changed that week.
821-
emit windows windows-2022 windows-x86_64 zip bin/mcpp.exe registry/bin/xlings.exe default "$wn"
812+
# The 2025 image carries THREE toolsets -- 14.29.30133, 14.44.35207
813+
# and 14.51.36231 -- and clang takes the newest. The step that sets
814+
# `VCToolsInstallDir` below names 14.44, which gets a new image
815+
# (loader present) with an old STL (huxerui compiles). Measured on
816+
# this exact combination: `mcpp test -p huxerui-module` reported
817+
# `test result ok`, and the compile touched `MSVC\14.44.35207` six
818+
# times and 14.51 not once.
819+
emit windows windows-2025 windows-x86_64 zip bin/mcpp.exe registry/bin/xlings.exe default "$wn"
822820
printf ']}'
823821
} | sed 's/,]}/]}/' > /tmp/matrix.json
824822
echo "matrix=$(cat /tmp/matrix.json)" >> "$GITHUB_OUTPUT"
@@ -1002,6 +1000,30 @@ jobs:
10021000
key: mcpp-toolstore-${{ runner.os }}-${{ matrix.toolchain }}-${{ env.MCPP_VERSION }}-${{ github.run_id }}-${{ matrix.platform }}-${{ matrix.shard }}
10031001
restore-keys: |
10041002
mcpp-toolstore-${{ runner.os }}-${{ matrix.toolchain }}-${{ env.MCPP_VERSION }}-
1003+
- name: Pin the MSVC toolset clang compiles against
1004+
if: runner.os == 'Windows'
1005+
shell: pwsh
1006+
# The 2025 image ships 14.29.30133, 14.44.35207 AND 14.51.36231, and
1007+
# clang takes the newest -- the one that rejects `huxerui.huxerui`
1008+
# (mcpp-community/mcpp#609). `VCToolsInstallDir` is what a developer
1009+
# prompt exports and what clang's MSVC detection reads, so naming 14.44
1010+
# here keeps the image -- and its Vulkan loader -- while stepping off
1011+
# the STL that cannot be compiled. See the emit-windows comment above.
1012+
#
1013+
# THROW rather than fall back. A missing directory silently reverting to
1014+
# 14.51 would reappear as the same static_assert three shards later,
1015+
# attributed to whichever descriptor changed that week -- which is
1016+
# exactly the failure mode a rolling label already caused here once.
1017+
run: |
1018+
$ver = "14.44.35207"
1019+
$root = "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\$ver"
1020+
if (-not (Test-Path $root)) {
1021+
Get-ChildItem "C:\Program Files*\Microsoft Visual Studio\*\*\VC\Tools\MSVC\*" -Directory -EA SilentlyContinue |
1022+
ForEach-Object { Write-Host " present: $($_.FullName)" }
1023+
throw "MSVC $ver is not on this image; see the emit-windows comment before changing the pin"
1024+
}
1025+
Write-Host "VCToolsInstallDir -> $root"
1026+
"VCToolsInstallDir=$root\" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
10051027
- name: Download mcpp
10061028
shell: bash
10071029
env:

0 commit comments

Comments
 (0)