Open lubo-pisk opened 6 months ago
Do you have an example where this @SuppressLint
usage is coming from?
I don't think Dagger uses @SuppressLint
anywhere in our API or generated code, so it's unclear what we could do to fix this on our side.
We don't see the same problem in our codebase. However, Dagger uses kotlinx-metadata
to process Kotlin code in the kapt processor. In our project, compiling it with K2 KAPT enabled will produce NullPointer exception there. As Kotlin 2.0.0 comes with a new stable artifact for metadata processing, which makes it incompatible with the metadata generated with the K2/kapt. Resolving this requires an update to the newer artifact. I'm not so sure if the newer artifact will be backward compatible with K1-produced code though.
I have following configuration:
K2 Compiler Kotlin 2.0.0-Beta1 Dagger 2.50
kotlin.experimental.tryK2=true kapt.use.k2=true
Build failed with error:
Only Dagger uses kapt in my project.
Build is ok when kapt.use.k2=false.