-
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
False-positive with Checker Framework 3 and Buck on JDK11 #5058
Comments
Thanks for the bug report. I'm sorry you are having trouble. I appreciate the simple reproduction instructions. I am able to reproduce your problem within Buck. However, I have not been able to reproduce the problem outside Buck. How can I get Buck to output the exact javac command line that it runs, so that I can reproduce the problem outside Buck? |
I believe running the build with |
I ran this myself earlier and I've attached the output. Specifically, the command that appears to be failing is:
Some other observations:
(Edit) A further observation: running the build multiple times seems to sometimes work:
|
This is weird. My wild guess would be some classloader issue, where the @artempyanykh any idea what is going on here (if you have time)? |
Assuming, there's not a lot of differences between our internal setup and OSS version of buck (I think there shouldn't, at least conceptually):
When I need to debug such issues in our code, I usually run buck in debug mode (it's java process anyway), put breakpoints in the analyser's code and see what's going on exactly that makes the check fail. |
@artempyanykh Is there a way to configure Buck to use an external javac? In general I realize that starting a new process is inefficient. |
@mernst the easiest one is probably via a config flag I've made several iterations of the following, and there were no errors.
Without an external javac the error can be reproed easily. Note: @swarren12 huge thanks for providing the repo with a repro! One small suggestion is to rename |
I have made a pull request that summarizes this discussion in the Checker Framework manual. Could one of you please review it to ensure that it is accurate? Thanks! |
Recently, I helped in an attmept to update a large monorepo built using Buck from JDK1.8 to JDK11; as part of that migration Checker Framework was updated from 2.10 to 3.17. However, the project no longer builds as Checker Framework throws errors that were not present previously. From what I can tell, it appears that the upgrade has introduced some false positives.
I have recreated one particular problem with a cutdown project.
At a guess I would point a finger here at some incompatibility between Checker 3 and Buck; however, the manual does not seem to suggest that there are any known issues.
Commands
Inputs
n/a
Outputs
Expectation
The project should build without an error.
Justification:
final @Milliseconds long time = clock.currentTimeMillis();
.Clock
interface is annotated as@Milliseconds long currentTimeMillis();
;Additionally, if I'm reading the error correctly, Checker Framework does think the signatures match and so I'm unclear as to exactly why it is failing.
The text was updated successfully, but these errors were encountered: