kelloggm / checkerframework-gradle-plugin

Gradle plugin to use the Checker Framework for Java
Apache License 2.0
64 stars 15 forks source link

This plugin will not work on JDK 23 #272

Open kelloggm opened 1 month ago

kelloggm commented 1 month ago

Annotation auto-discovery will be disabled by default starting in JDK 23: https://mail.openjdk.org/pipermail/jdk-dev/2024-May/009028.html

This plugin uses auto-discovery to run checkers in most builds, via the CreateManifestTask. If I recall correctly, the original motivation for that decision was that the user might be relying on auto-discovery for other annotation processors, so if the user's build did not explicitly specify annotation processors, we couldn't do so either (because if we specified annotation processors directly, then auto-discovery would be disabled).

On JDK 23 with auto-discovery disabled, this plugin's job should be simplified: we can just modify the list of annotation processors directly, since an explicit empty list of processors will have the same semantics as the lack of any annotation processing options. However, we'll probably need to retain the current behavior of the plugin for the new -proc:full mode, which keeps the pre-JDK-23 behavior.