@@ -31,9 +31,18 @@ version = "{{ vars.rust_nightly }}-x86_64-pc-windows-gnullvm"
3131[vars ]
3232# portable-msvc script pin: gist id + revision (immutable content address) + sha256 of that revision.
3333# Bump all three together after reviewing a new upstream revision.
34+ # The floor is the revision that matches SDK payload names with either path separator. The Visual Studio
35+ # manifest moved them from `Installers\\` to `Installers/`, so older revisions find no SDK package, download
36+ # none, and die at their `versions` step:
37+ #
38+ # sdkv = first((OUTPUT / "Windows Kits/10/bin").glob("*")).name
39+ # AttributeError: 'NoneType' object has no attribute 'name'
40+ #
41+ # Seen on commit https://github.com/edge-toolkit/core/commit/fc2e5639cb63d541269501663973a94d3138ea5f at
42+ # https://github.com/edge-toolkit/core/actions/runs/39527031634/job/118983994353.
3443a_pmsvc_gist = " 7f3162ec2988e81e56d5c4e22cde9977"
35- a_pmsvc_rev = " ba48b0a3d9ea05c6caa5e583eda60fa7510da4bc "
36- a_pmsvc_sha = " 295a6d7e3e6a7132199ec51224216b07c54af29df9c8ba9bf01166ce12451c0a "
44+ a_pmsvc_rev = " 49b58850aa5e5c1e65f090d4651ee76607883e11 "
45+ a_pmsvc_sha = " 1791cccca594ff083ce8d3e0a139e6156d2c312e24332a909e608010f0230a51 "
3746# Clear config.windows.toml's et-ws-web-runner exclusion.
3847cargo_ws_excludes = " "
3948# et-cli lands under the msvc target dir once CARGO_BUILD_TARGET below is flipped.
@@ -65,11 +74,13 @@ run = """
6574base="{{ vars.msvc_base }}"
6675coreutils mkdir -p "$base"
6776script="$base/portable-msvc.py"
68- if [ ! -f "$script" ]; then
77+ sha() { coreutils sha256sum -b "$script" | coreutils cut -c1-64; }
78+ # Fetched when absent or left over from a previous pin, so a bump takes effect on an existing checkout.
79+ if [ ! -f "$script" ] || [ "$(sha)" != "{{ vars.a_pmsvc_sha }}" ]; then
6980 src=":http:mmozeiko/{{ vars.a_pmsvc_gist }}/raw/{{ vars.a_pmsvc_rev }}/portable-msvc.py"
7081 rclone copyto "$src" "$script" --http-url https://gist.githubusercontent.com --progress
7182fi
72- actual=$(coreutils sha256sum -b "$script" | coreutils cut -c1-64 )
83+ actual=$(sha )
7384[ "$actual" = "{{ vars.a_pmsvc_sha }}" ] || {
7485 echo "portable-msvc.py checksum mismatch: $actual" >&2
7586 exit 1
@@ -78,7 +89,10 @@ actual=$(coreutils sha256sum -b "$script" | coreutils cut -c1-64)
7889# The rendered msvc.env tracks whatever is installed, so a bump only needs these two flags changed and a
7990# re-run after deleting target/msvc/msvc.
8091py="{{ vars.py3_win_fwd }}"
81- if [ ! -d "$base/msvc/VC" ]; then
92+ # A stage counts as complete only with both halves, so one missing its SDK is wiped and staged again.
93+ # The script writes the MSVC half before it unpacks the SDK, so a run that fails in between leaves `VC` behind.
94+ if [ ! -d "$base/msvc/VC" ] || [ ! -d "$base/msvc/Windows Kits/10/bin" ]; then
95+ coreutils rm -rf "$base/msvc"
8296 (cd "$base" && "$py" portable-msvc.py --accept-license --msvc-version 14.51 --sdk-version 26100)
8397fi
8498"$py" - "$base/msvc" "$base/msvc.env" <<'PY'
0 commit comments