Good point Matt! Annotation processing has always been an unpleasant magic to work with from a developer perspective for the reasons you shared. What are our alternatives? Can't we offer a `META-INF/log4j.factories` functionality similar to Spring Boot? If so,
1. What are its cons/pros for users? 2. What are its implementation requirements (for the Log4j crew) roughly? On Fri, Oct 20, 2023 at 7:40 PM Matt Sicker <m...@musigma.org> wrote: > Snippet from the JDK 21 announcement email that pertains to us. While the > annotation processor was initially developed to try to be implicit and > magic, as we’ve seen both in our build and in IDEs, annotation processing > is typically either disabled by default (in IDEs) or sometimes requires > manual setup anyways (like in our build). It sounds like starting in Java > 22, implicit annotation processing will no longer be available. We’ll need > to ensure our docs about this mention that you need to enable annotation > processing in your build, too. > > > Begin forwarded message: > > > > From: David Delabassee <david.delabas...@oracle.com> > > Subject: JDK 21 Is Now GA, a New VS Code Extension, and an Annotation > Processing Heads-up > > Date: October 20, 2023 at 4:39:07 AM CDT > > To: "dev@logging.apache.org" <dev@logging.apache.org> > > Reply-To: dev@logging.apache.org > > List-Id: <dev.logging.apache.org> > > > > ## Heads-Up - JDK 22: Implicit Annotation Processing Behavior Change > > > > As discussed in the July 2023 Quality Outreach update [8], starting in > JDK 21 javac emits a note if _implicit_ annotation processing is being > used, that is, if one or more annotation processors are found and run from > the class path when no explicit annotation processing configuration options > are used. > > > > The note is reported since, quoting from the note text: "A future > release of javac may disable annotation processing unless at least one > processor is specified by name (-processor), or a search path is specified > (--processor-path, --processor-module-path), or annotation processing is > enabled explicitly (-proc:only, -proc:full)." > > > > That future version of javac has arrived in JDK 22 b19+ with JDK-8306819 > ("Consider disabling the compiler's default active annotation processing"). > In the situation where a note was emitted in JDK 21, in JDK 22 no note is > emitted, and annotation processors are *not* run. To restore the previous > behavior with respect to running annotation processors, add the > '-proc:full' javac option. > > > > Feedback on the annotation processing policy change can be sent to > compiler-dev [9]. > > > > [8] > https://mail.openjdk.org/pipermail/quality-discuss/2023-July/001122.html > > [9] https://mail.openjdk.org/mailman/listinfo/compiler-dev > >