RFR: 8321314: Reinstate disabling the compiler's default active annotation processing
Joe Darcy
darcy at openjdk.org
Fri May 24 18:47:00 UTC 2024
On Fri, 24 May 2024 16:13:11 GMT, Josiah Noel <duke at openjdk.org> wrote:
> > Since [JDK-8306819](https://bugs.openjdk.org/browse/JDK-8306819), support for '-proc:full' has been backported to earlier update release trains. This should ease the impact of the behavioral change.
>
> I'm not sure I follow. Since the warning saying "implicit annotation processing will be disabled" was not also backported, how would people on earlier Java versions even know to use this new parameter?
>
> As it stands, the behavior change will still break a large number of builds that rely on implicit annotation processing, so I don't understand how the impact was reduced. Perhaps I'm looking at it from the wrong angle?
With `-proc:full` backed to 17u and 11u (already in JDK 21) ,together with current version of the Maven compiler plugin supporting `-proc:full`, the ability to specific `-proc:full` in a build is decoupled from upgrading to JDK 21 or later.
In other words, developers today[*] can change their build configurations to work seamlessly with a future upgrade to JDK 23, or later, with the different annotation processing default.
Of course, if a build is not using annotation processing, it will work fine after the change too. Various other explicit build configurations to support annotation processing, such as setting the processor path, are possible as well.
[*] Using the current Maven compiler plugin and current version of a JDK update release.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19331#issuecomment-2130156419
More information about the compiler-dev
mailing list