-
Notifications
You must be signed in to change notification settings - Fork 357
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
Warn the user or even fail the build in case pre 1.8.0_202 Java is used #3974
Comments
I agree that the invalid bytecode produced by broken compilers is a nasty issue. If you compile code with the Checker Framework, you will not suffer any problems from invalid bytecode, no matter what version of Java you are using. I think your use case is:
The Checker Framework doesn't have a way of knowing which compiler was used to compile which library, so I don't see how to issue this message in the appropriate way. It also doesn't seem appropriate to issue the message when the Checker Framework is running, since that is the only situation when we can be sure that the bytecode is valid! Could you clarify what warning you are suggesting? Thanks. |
Ah, you are right. The Checker Framework runs with a different Java version :( |
Supporting Java 1.8 becomes hard. It might probably make sense to reference known OpenJDK 1.8 issues for those who uses not that recent Java 1.8 and considers type annotations. As a workaround, something like |
Related: #1928 |
Old Java versions have known issues that cause invalid bytecode produced for the perfectly valid Java code.
For instance: policeman-tools/forbidden-apis#173 (comment)
That might result in "invalid bytecode" being published to Maven Central, which is a very sad issue to have.
What do you think if the Checker Framework fails the build in case old Java 1.8 is used?
For instance:
java.version
startsWith("1.8.0_") and the trailer is a numeric less than 202I've added the check to Apache Calcite in apache/calcite@fd20efd, however, it would be nice if the Checker Framework included a similar check as well.
The text was updated successfully, but these errors were encountered: