From cd76eb0a95b545e0cf957f2f0317eb81e88ff102 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 10 Oct 2026 18:39:29 +0200 Subject: [PATCH] flutter-setup: exact-key pub cache only (prefix restore-keys broke pub get after a git-dep bump) Co-Authored-By: Claude Opus 5.5 (1M context) --- flutter-setup/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flutter-setup/action.yml b/flutter-setup/action.yml index 412ebfe..42adb98 100644 --- a/flutter-setup/action.yml +++ b/flutter-setup/action.yml @@ -58,9 +58,13 @@ runs: echo "$HOME/sdk/flutter-slim/bin" >> "$GITHUB_PATH" echo "PUB_CACHE=$HOME/.pub-cache" >> "$GITHUB_ENV" + # Exact key only, no prefix restore-keys: an older lockfile's pub cache, + # restored after a git-dependency bump, made `flutter pub get` fail with + # "package_graph.json: dependencies for missing" (daily-limits, + # 2026-10-10), and a failed job never saves the new key, so every rerun + # failed the same way. A lockfile change now pays one cold `pub get`. - name: Restore the pub cache uses: actions/cache@v4 with: path: ~/.pub-cache key: pub-${{ inputs.flutter-version }}-${{ runner.os }}-${{ hashFiles(format('{0}/pubspec.lock', inputs.working-directory)) }} - restore-keys: pub-${{ inputs.flutter-version }}-${{ runner.os }}-