stechio commented on issue #3771: URL: https://github.com/apache/logging-log4j2/issues/3771#issuecomment-5081668926
@ppkarwasz: > Hi [@ctubbsii](https://github.com/ctubbsii), thanks for clarifying your setup. > > > I think I saw warnings with the unused `-A` option on the multi-module project (even with `-Xlint:-processing`, though that might need further debugging), and also when we didn't set it. Both caused `maven-compiler-plugin` to exit and fail our build. So, setting it didn't work, and neither did leaving it unset. > > You’re right: > > * If you **do** provide the `-A` options but there’s no `@Plugin` in the sources, javac emits a warning about unrecognized processor options. That diagnostic does **not** come from the `-Xlint` framework, so `-Xlint:-processing` won’t silence it. > > * If you **don’t** provide the `-A` options and there _are_ `@Plugin` annotations, then the `GraalVmProcessor` itself emits a warning. > > > To avoid either case, the safest setup is to add the `-A` options **only** in the module(s) that actually declare Log4j plugins, and to scope them to the appropriate execution (`default-compile` for `main`, `default-testCompile` for `test`) **Unfortunately, in my experience, that's NOT the case**: due to javac's lazy processor discovery, *the incremental compilation of a module whose `@Plugin`-annotated compilation units are not stale won't activate the `GraalVmProcessor`, leaving its `-A` options unused and emitting warnings about unrecognized processor options as well*, thus defeating your proposed solution (my configuration is local to the very module containing `@Plugin`-annotated sources, yet it keeps failing because of the behavior just described!). > What we _can_ do, however, is reconsider the severity: we could lower the message from `WARNING` to `NOTE`. **YES, PLEASE!** — moving the message severity below the failing threshold would politely solve this needlessly painful conundrum ;) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
