fix(tool): the checks fetch the packages first
All checks were successful
CI / check (push) Successful in 21m0s
CI / deploy (push) Has been skipped

After a merge or a switch of branch the workspace's resolution could
still be the one from before, and the pre-push hook's analysis failed on
packages it couldn't find (v0.13.0's push, and the stack's on 17 Oct).
The checks now fetch what the checked-out pubspecs and lock name before
anything else, with --enforce-lockfile, so a check never changes the
lock. About 3 s when nothing is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-17 20:18:15 +02:00
commit 971af90ba0
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
2 changed files with 8 additions and 1 deletions

View file

@ -42,7 +42,7 @@ Checklist after doing changes, in this order:
- `dart format` (CLI) on the files you changed - `dart format` (CLI) on the files you changed
- `create_migration` and `apply_migrations` (MCP - only if necessary) - `create_migration` and `apply_migrations` (MCP - only if necessary)
- `tool/check.sh` (CLI): format check, `dart analyze --fatal-infos`, server and app tests. The pre-push hook runs the same script, so a push only goes through when it passes. - `tool/check.sh` (CLI): the packages the lock names (`flutter pub get --enforce-lockfile`, so a merge never leaves the resolution behind), format check, `dart analyze --fatal-infos`, server and app tests. The pre-push hook runs the same script, so a push only goes through when it passes.
- Do `serverpod` MCP `hot_restart` if required (hot reload is done automatically). Will also hot restart Flutter app - Do `serverpod` MCP `hot_restart` if required (hot reload is done automatically). Will also hot restart Flutter app
- Check `serverpod` MCP `tail_server_logs` and `tail_flutter_logs` for any issues. - Check `serverpod` MCP `tail_server_logs` and `tail_flutter_logs` for any issues.

View file

@ -27,6 +27,13 @@ if ! git diff --quiet HEAD; then
echo 'Note: the working tree has uncommitted changes; they are checked too.' echo 'Note: the working tree has uncommitted changes; they are checked too.'
fi fi
# The packages the checked-out pubspecs and lock name, fetched first: after a merge or a
# switch of branch the workspace's resolution can still be the one from before, and the
# analysis then failed on packages it couldn't find (2026-10-13, 2026-10-17). The lock
# decides (--enforce-lockfile), so a check never changes it.
echo '▸ Packages'
flutter pub get --enforce-lockfile > /dev/null
# Our own Dart files. Generated code is left out: the client package as a whole, the # Our own Dart files. Generated code is left out: the client package as a whole, the
# server's generated sources and test tools, and the app's localizations (gen-l10n). (A # server's generated sources and test tools, and the app's localizations (gen-l10n). (A
# loop instead of mapfile: macOS ships bash 3.) # loop instead of mapfile: macOS ships bash 3.)