RFR: JDK-8306819: Consider disabling the compiler's default active annotation processing

Josiah Noel duke at openjdk.org
Mon Sep 11 18:02:39 UTC 2023


On Mon, 11 Sep 2023 17:10:01 GMT, David M. Lloyd <duke at openjdk.org> wrote:

> I'm not sure about other build tools, but Maven does supply a means to include an annotation processor on a (relatively) isolated class path, i.e. separately from the application's class path. Though this is somewhat more cumbersome, it is certainly safer.

Maven's `annotationProcessorPaths` has its own CP issues when compared to using implicit processing. Even now I have code in our processor to check if the processor is [currently running in `annotationProcessorPaths`](https://github.com/avaje/avaje-inject/blob/13ce75156de310d078e1520231fe91cc7d5874b9/inject-generator/src/main/java/io/avaje/inject/generator/ExternalProvider.java#L17-L28) since the cp can get wonky when using it. (especially when dealing with JPMS)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14432#issuecomment-1714343861


More information about the compiler-dev mailing list