This example
@Module
class ExampleModule {
@Provides fun int(): Int = 3
}
Will crash the dagger-compiler in KSP when processing with this
not a valid name: int
java.lang.IllegalArgumentException: not a valid name: int
at com.squareup.javapoet.Util.checkArgument(Util.java:53)
at com.squareup.javapoet.MethodSpec$Builder.setName(MethodSpec.java:315)
at com.squareup.javapoet.MethodSpec$Builder.<init>(MethodSpec.java:310)
at com.squareup.javapoet.MethodSpec$Builder.<init>(MethodSpec.java:294)
at com.squareup.javapoet.MethodSpec.methodBuilder(MethodSpec.java:188)
at dagger.spi.internal.shaded.androidx.room.compiler.codegen.XFunSpec$Companion.builder(XFunSpec.kt:112)
at dagger.spi.internal.shaded.androidx.room.compiler.codegen.XFunSpec$Companion.builder(XFunSpec.kt:99)
at dagger.spi.internal.shaded.androidx.room.compiler.codegen.XFunSpec.builder(XFunSpec.kt)
Seems dagger may wanna check this name before handing it off to JP