ZacSweers / kotlin-compile-testing

A library for testing Kotlin and Java annotation processors, compiler plugins and code generation
Mozilla Public License 2.0
109 stars 7 forks source link

No compile output generated when using ksp #265

Closed rossbacher closed 4 months ago

rossbacher commented 4 months ago

When using ksp 1 and setting languageVersion to 1.9 ksp output sources are generated but no compile output (in the classes folder )is generated.

Thus subsequent java compilation which requires the compiled Kotlin classes as input to the classpath fails.

The same tests (it's using xprocessing to support both ksp and kapt) passes with the kapt annotation processor and kapt4 enabled.

rossbacher commented 4 months ago

Of course just after writing this I stumbled accross https://github.com/ZacSweers/kotlin-compile-testing/issues/197#issuecomment-1925228827 and setting kspWithCompilation to true fixes this issue. Oddly enough this was not required when using com.github.tschuchortdev:kotlin-compile-testing-ksp:1.5 which we migrated from.