kvision-examples icon indicating copy to clipboard operation
kvision-examples copied to clipboard

Classes in build/generated-src not regenerated automatically

Open jschneider opened this issue 3 years ago • 2 comments

Steps to reproduce:

  • Checkout template-fullstack-ktor
  • ./gradlew clean build
  • --> fails with test compile error
  • delete tests: rm src/frontendTest/kotlin/test/ -R
  • ./gradlew build
  • --> build successfully
  • rm build/generated-src/ -R
  • ./gradlew build
  • --> Compile error related to the missing classes
  • ./gradlew clean build somehow seems to fix this issue again

jschneider avatar Feb 08 '21 17:02 jschneider

The code in generated-src is created by the compiler plugin, which is executed during compilation phase. When you remove only this generated code, gradle apparently doesn't compile anything and doesn't execute the plugin (because it doesn't know it should). Perhaps it can be fixed somehow, but I don't gradle good enough to know how :-)

rjaros avatar Feb 08 '21 17:02 rjaros

I run into the problem without removing the directory manually. I think it might be related to the build cache maybe?

jschneider avatar Feb 08 '21 20:02 jschneider

The problem is now fixed with KSP plugin.

rjaros avatar Sep 13 '22 16:09 rjaros