fix(firebase_auth): compile Android Kotlin without checker-qual on inferred types - #18610
fix(firebase_auth): compile Android Kotlin without checker-qual on inferred types#18610SelaseKay wants to merge 2 commits into
Conversation
…r-qual firebase-auth class files reference @UnknownInitialization but do not declare checker-qual. Kotlin 2.4 fails when inferring SAM parameter types against that annotation (IdTokenListener).
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
The compile failure is only on inferred SAM parameter types. An explicit FirebaseAuth type is enough; checker-qual is not needed. Bump the auth example to Gradle 8.14, AGP 8.11.1, and Kotlin 2.4.10 so CI compiles the language version that turns the warning into an error.
Description
:firebase_auth:compileDebugKotlinfails on Kotlin 2.4 whenIdTokenChannelStreamHandlerinfers theIdTokenListenerparameter type.com.google.firebase:firebase-authclass files reference@UnknownInitializationbut do not declareorg.checkerframework:checker-qual, so the inferred type is inaccessible.Giving the SAM lambda an explicit
FirebaseAuthparameter type is enough — Kotlin no longer infers the annotated type. Confirmed on Kotlin 2.4.10 with nochecker-qualon the classpath.The auth example is bumped to Gradle 8.14, AGP 8.11.1, and Kotlin 2.4.10 so CI compiles the language version that turns this from a 2.3 warning into an error.
Upstream packaging issue: firebase/firebase-android-sdk#8557
Related Issues
Checklist
///).melos run analyze) does not report any problems on my PR.This is a Gradle/Kotlin compile fix; there is no Dart behavior change to cover with an integration test. The example toolchain bump makes
e2e-authAndroid compile with Kotlin 2.4.Breaking Change
Test plan
:firebase_auth:compileDebugKotlinfails on Kotlin 2.4.10 without the explicit type{ auth: FirebaseAuth -> }and no checker-qual