Navigation Menu

Skip to content
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

Hardcoded test for JDK 8, 11, or 16 is problematic #4932

Closed
eikemeier opened this issue Oct 18, 2021 · 3 comments · Fixed by #4936
Closed

Hardcoded test for JDK 8, 11, or 16 is problematic #4932

eikemeier opened this issue Oct 18, 2021 · 3 comments · Fixed by #4936

Comments

@eikemeier
Copy link

When running in JDK 17 LTS, the annotation processor checks for JDK 8, 11, or 16 and emits a warning when running on another platform:

https://github.com/typetools/checker-framework/blob/checker-framework-3.18.1/framework/src/main/java/org/checkerframework/framework/source/SourceChecker.java#L537

This warning is not easily suppressed and terminates a build running with -Werror. While the intention is good, it would be preferable to be able to build on JDK 17 without workarounds.

The plugin should either just emit a Kind.NOTE or prove a flag to suppress this warning. I'm willing to submit a patch for either solution.

@mernst
Copy link
Member

mernst commented Oct 21, 2021

You are right. Thank you for pointing out that we overlooked updating this when JDK 17 was released, and my apologies for the inconvenience.

With 42255c9 (plus commits in a number of related repositories), the Checker Framework supports, and is tested under, JDK 17. It probably works on all versions 8+, though in the past, it would crash when run on the wrong version, which was the reason for the hard error. We should remove that in the future, though we don't want to commit resources to versions of Java that are no longer supported.

Thanks again, and please let us know if you have any other problems.

@mernst mernst linked a pull request Oct 21, 2021 that will close this issue
@mernst mernst closed this as completed Oct 21, 2021
@eikemeier
Copy link
Author

Thanks, looks great. How about not removing it in the future, but using Kind.NOTE now?

@mernst
Copy link
Member

mernst commented Oct 28, 2021

OK, I have done so in #4943. Thanks for the nudge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants