-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
K2 KAPT (aka KAPT4) doesn't like inline/reified. #4373
Comments
Thanks for the report. The error seems to be from xprocessing, a library Dagger uses. Here's the stacktrace I got from the repro. This could happen if we're trying to call
|
Neat! Thank you for your attention. I feel good that y'all have everything handled. |
This is due to an issue or behavior change in KAPT4. I'm making a workaround fix in an underlying library Dagger uses and it should be included in a future Dagger release. |
Inline reified functions have a null descriptor/signature under K2 and KAPT4 and this leads to NullPointerException even when accessing the annotations of fields in the same class as we need to check all function descriptors for annotations on synthetic property accessors. So we're making the descriptor nullable in this CL. Bug: google/dagger#4373, https://youtrack.jetbrains.com/issue/KT-70600 Test: KotlinMetadataTest Change-Id: Ic772ab2beffba01c13c69ded4284e9b8b424399b
Hi @kuanyingchou! I've seen this fix didn't land on 2.52. Which release can we expect this fix? |
Hi, @guuilp , 2.52 was released before the fix so please watch out for the next Dagger release, or alternatively You can try Kotlin 2.1.0-Beta1, which contains a different K2 KAPT implementation and should have fixed this. |
Awesome! I'll definitely give it a try, thanks for the tip! |
Kotlin 2.0.20-Beta2
Dagger 2.51.1
Apparently having an inline/reified inside one of the injecting classes breaks things.
I attached a small reproducing project:
Example.zip
The text was updated successfully, but these errors were encountered: