From 18135a97a874edcc07b462fa203581e812a8adc8 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Thu, 12 Nov 2026 19:31:09 -0500 Subject: [PATCH] ci(windows): materialise git symlinks before resolving packages Since the 6.5 merge every cw_*/pubspec_overrides.yaml is a git symlink to ../pubspec_overrides.yaml. Git for Windows checks those out as text files holding the target path, so model_generator.sh's `flutter pub get` in cw_core read "../pubspec_overrides.yaml" as YAML and failed with "The pubspec must be a YAML mapping". Copy each tracked symlink's target over it right after checkout, and refuse if a target is missing. --- .github/workflows/build-windows.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index fd1bbfc7b..a8777fa65 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -72,6 +72,28 @@ jobs: git config --global user.name "Hash Bags CI" git config --global --list + # ---- Git symlinks ----------------------------------------------------- + # Since the 6.5 merge each cw_*/pubspec_overrides.yaml is a git symlink to + # ../pubspec_overrides.yaml. Git for Windows checks symlinks out as text + # files holding the target path, so `flutter pub get` in a module reads + # "../pubspec_overrides.yaml" as YAML and refuses ("The pubspec must be a + # YAML mapping"). Replace every tracked symlink with a copy of its target. + - name: Materialise git symlinks as copies + run: | + set -euo pipefail + git ls-files -s | awk '$1 == "120000" { print $4 }' | while read -r link; do + target="$(dirname "$link")/$(cat "$link")" + if [ -f "$target" ]; then + cp --remove-destination "$target" "$link" + echo "copied $target -> $link" + elif [ -d "$target" ]; then + echo "leaving directory symlink $link -> $target" + else + echo "FATAL: $link points at $target, which does not exist" >&2 + exit 1 + fi + done + # ---- Rust toolchain --------------------------------------------------- # The dnssec_proof plugin builds its native lib through cargokit # (windows/CMakeLists.txt -> apply_cargokit), so `flutter build windows`