-
Notifications
You must be signed in to change notification settings - Fork 352
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
3.16.0 introduces compilation failures around use of getClass()
#5431
Comments
The defaulting annotations of lower bounds for the KeyFor Checker changed. The manual explains the defaulting, why you are seeing errors, and how to fix them. Let us know if we need to clarify anything. |
Thank you! Giving it a try... |
Follow-up question: what is the danger of the unsoundness introduced by suppressing |
I am asking this because the annotations in Beam for this case are getting esoteric enough that I worry about people pushing back on our use of checker. |
If your code has no |
Awesome, that works perfectly for us at this time. |
(I wrote to checkerframework-discuss mailing list but also submitting here for exposure)
TL;DR: It seems that most or all uses of
getClass()
produce[super @KeyForBottom Void]
and the uses in the code expect[super @UnknownKeyFor NullType]
starting with checkerframework 3.16.0. Is there some specific change in 3.16.0 that introduces this that I can learn about? Does anyone know how to work around it?Details:
I am trying to upgrade the checkerframework version used by Apache Beam. When I reach 3.16.0 I hit a new issue I do not yet understand how to fix. The issue persists through 3.27.0. There are checker framework crashes in 3.16.0 and 3.17.0 that are not relevant, so I will submit my question with 3.18.0.
It seems most of the errors are roughly similar. Here is one (note that the method name is "TypeDescriptors.of" so it reads a little funny):
The code in question:
There are quite a few other similar, typically simple, uses.
Commands to reproduce:
Expectation: compile success as it succeeds with 3.15.0 and below.
Actual result: compile failure as above.
The text was updated successfully, but these errors were encountered: