-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagnose incompatible Java system classpaths #19547
Conversation
Stacked on #19546 |
I am having a hard time getting the correct Java compilation runtime selected in the tests. I will look into this again after the first review. |
Turns out that |
src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/FormattedDiagnostic.java
Outdated
Show resolved
Hide resolved
e581976
to
e65811e
Compare
@fmeum can you please take a look at the conflicts? Thanks |
When the Java system classpath extracted from the target Java runtime is more recent than the Java runtime used for Java compilation, JavaBuilder now emits a `[BazelJavaConfiguration]` diagnostic with actionable information instead of a bunch of "bad class file" errors on `module-info` files. Example: ``` error: [BazelJavaConfiguration] The Java 17 runtime used to run javac is not recent enough to compile for the Java 20 runtime in external/remotejdk20_linux. Either register a Java toolchain with a newer java_runtime or specify a lower --java_runtime_version. ```
e65811e
to
6273cd5
Compare
@iancha1992 Done! |
When the Java system classpath extracted from the target Java runtime is more recent than the Java runtime used for Java compilation, JavaBuilder now emits a
[BazelJavaConfiguration]
diagnostic with actionable information instead of a bunch of "bad class file" errors onmodule-info
files.Example:
Work towards #17281