google / ksp

Kotlin Symbol Processing API
https://github.com/google/ksp
Apache License 2.0
2.81k stars 265 forks source link

KSP warnings to raise a bug on Room even without Room #1652

Open michaelaubertcmc opened 9 months ago

michaelaubertcmc commented 9 months ago

Attempting to build an Android application after migrating from kapt to ksp, I see hundreds of warning like:

w: [ksp] No dependencies reported for generated source *******_Factory.java which will prevent incremental compilation.
Please file a bug at https://issuetracker.google.com/issues/new?component=413107

Component 413107 is Jetpack Room. The Android application I'm trying to build does not depend on Room. There is no ".room" anywhere in the source code.

I found https://github.com/airbnb/Showkase/issues/322 and removed a similar multi-preview annotation. That unfortunately didn't remove the warnings.

I have not attached source code because there are hundreds of similar warnings in several gradle modules. I didn't see anything suspicious that the source files have in common so I don't know how to build a sample project to reproduce. I understand this isn't an easy issue but any help with the investigation would be appreciated.

The only KSP line in gradle dependencies {} blocks is:

ksp "com.google.dagger:dagger-compiler:2.49"

Versions used:

Any other information that could help, feel free to ask

neetopia commented 8 months ago

It might be from xprocessing which is an intermediate layer for porting processors, initially used by Room later to larger user base, since Dagger is using Xprocessing, it might be the cause you see this confusing error.

The referenced issue in Dagger is more suitable place for discussing this issue, let me know if they found any issue in KSP.

michaelaubertcmc commented 8 months ago

Thanks @neetopia I've added your info to Dagger issue 4182. Hopefully that will help. I'll add more progress here when I know more