Diagnose incompatible Java system classpaths #19547
Closed
fmeum wants to merge 1 commit intobazelbuild:masterfrom
Closed
Diagnose incompatible Java system classpaths #19547fmeum wants to merge 1 commit intobazelbuild:masterfrom
fmeum wants to merge 1 commit intobazelbuild:masterfrom
Conversation
Collaborator
Author
|
Stacked on #19546 |
Collaborator
Author
|
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. |
Collaborator
Author
Turns out that |
cushon
reviewed
Sep 18, 2023
src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/FormattedDiagnostic.java
Outdated
Show resolved
Hide resolved
e581976 to
e65811e
Compare
cushon
approved these changes
Sep 21, 2023
hvadehra
approved these changes
Oct 2, 2023
Member
|
@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
Collaborator
Author
|
@iancha1992 Done! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-infofiles.Example:
Work towards #17281