From 2904d97b2c3b67511bc59894a54f0cd1f483c20b Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Mon, 7 Sep 2026 15:30:00 +0200 Subject: [PATCH] Bring the phone app's analyzer up to latest stable very_good_analysis ^10.3.0 -> ^11.0.0, which the freshness gate flagged against phone_app/pubspec.yaml the moment the pre-push CI mirror ran --all-files. Pre-existing; it blocked the push rather than being caused by it. The major bump newly flags two async_return_with_no_await sites, both now `return await` rather than suppressed. The rule is correct in both: a future returned without awaiting escapes the enclosing async function, so a failure surfaces at the caller with a stack trace that no longer names the code that made the call. firebase_backend.dart:91 is the one that matters -- a rejected credential fetch should fail inside the function that describes itself as recovering from exactly that. flutter analyze clean, 146 phone-app tests pass. Co-Authored-By: Claude Opus 5 --- phone_app/lib/services/firebase_backend.dart | 2 +- phone_app/lib/services/google_sign_in_backend.dart | 2 +- phone_app/pubspec.lock | 6 +++--- phone_app/pubspec.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/phone_app/lib/services/firebase_backend.dart b/phone_app/lib/services/firebase_backend.dart index b0a7176..17c05a0 100644 --- a/phone_app/lib/services/firebase_backend.dart +++ b/phone_app/lib/services/firebase_backend.dart @@ -88,7 +88,7 @@ Future openFirebase() async { // marker beside it. Treating the marker as the source of truth is what // made a phone with a live session sync over GitHub and 401 forever -- // the credential was in the keystore the whole time, unused. - return _clientFromStoredSession(); + return await _clientFromStoredSession(); } try { return await firebaseClientFor( diff --git a/phone_app/lib/services/google_sign_in_backend.dart b/phone_app/lib/services/google_sign_in_backend.dart index 90529a8..85317e9 100644 --- a/phone_app/lib/services/google_sign_in_backend.dart +++ b/phone_app/lib/services/google_sign_in_backend.dart @@ -75,7 +75,7 @@ Future googleIdToken({ Future Function()? signInFn, String serverClientId = kServerClientId, }) async { - if (signInFn != null) return signInFn(); + if (signInFn != null) return await signInFn(); if (serverClientId.isEmpty) { // A build without --dart-define=GOOGLE_SERVER_CLIENT_ID would otherwise // fail inside the plugin with a far less obvious message. diff --git a/phone_app/pubspec.lock b/phone_app/pubspec.lock index 08b7384..f0be741 100644 --- a/phone_app/pubspec.lock +++ b/phone_app/pubspec.lock @@ -724,10 +724,10 @@ packages: dependency: "direct dev" description: name: very_good_analysis - sha256: "481af67ab5877af20325251dc215a4ebac7666a1c8cf09198ffd457bc612b33d" + sha256: "0bd5eb8d6be76aa0d71e70cbdae6cac8f784f761170568e3c2214a6948c7f6d3" url: "https://pub.dev" source: hosted - version: "10.3.0" + version: "11.0.0" vm_service: dependency: transitive description: @@ -777,5 +777,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.12.2 <4.0.0" + dart: ">=3.13.0 <4.0.0" flutter: ">=3.44.0" diff --git a/phone_app/pubspec.yaml b/phone_app/pubspec.yaml index 0aa6119..4adb84b 100644 --- a/phone_app/pubspec.yaml +++ b/phone_app/pubspec.yaml @@ -49,7 +49,7 @@ dev_dependencies: flutter_launcher_icons: 0.14.4 flutter_test: sdk: flutter - very_good_analysis: ^10.3.0 + very_good_analysis: ^11.0.0 flutter: uses-material-design: true