-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Diagnose incompatible annotation processors
When an annotation processor is built targeting a language level that isn't supported by the Java runtime used for compilation, JavaBuilder now throws an exception with actionable information. Example: ``` java.lang.IllegalStateException: The Java 17 runtime used to run javac is not recent enough to run the processor com.google.devtools.build.runfiles.AutoBazelRepositoryProcessor, which has been compiled targeting Java 20. Either register a Java toolchain with a newer java_runtime or, if this processor has been built with Bazel, specify a lower --tool_java_language_version. at com.google.devtools.build.buildjar.javac.BlazeJavaCompiler.initProcessAnnotations(BlazeJavaCompiler.java:119) ... ``` Work towards #17281 Closes #19548. PiperOrigin-RevId: 570766544 Change-Id: I71a53201a63f153b2318fff0a938a6626149e02f
- Loading branch information
1 parent
2341891
commit 09d3f06
Showing
2 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters