Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vert.x Code Generator breaks Java compilation with Gradle v4.7 annotationProcessor #181

Open
vorburger opened this issue May 18, 2018 · 2 comments

Comments

@vorburger
Copy link

I have reason to believe that the Vert.x Code Generator APT processor completely breaks Java compilation in Gradle when using with Gradle v4.7 and the annotationProcessor.

Found in https://github.com/vorburger/minecraft-storeys-maker/issues/53, but now reproduced in https://github.com/vorburger/vertx-gradle-errorprone-bug-reproducer. That very simple project fails when using annotationProcessor (but works when using compile). But an APT processor on compile instead of annotationProcessor breaks Error Prone. It's also "not right", and AFAIK doesn't play nice with Gradle's incremental build.

In an ideal world, Vert.x's Code Generator should "just work" (out of the box) with Gradle v4.7 annotationProcessor.

@tbroyer
Copy link

tbroyer commented May 18, 2018

Apparently, the MVEL generator loads codegen.json and templates from its classloader. If it's expected that these are on the compile classpath (rather than the processor path), then it should use the processingEnv.getFiler() instead.

Fwiw, you should be able to reproduce it with Maven too using the <annotationProcessorPaths> from maven-compiler-plugin: https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths

@vorburger
Copy link
Author

@tbroyer we meanwhile figured it's actually got nothing to do with that - it's some APT issue in Gradle.

TODO check if https://docs.gradle.org/4.8-rc-1/release-notes.html makes any difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants