-
Notifications
You must be signed in to change notification settings - Fork 299
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
Default option when we don't provide -Xep:NullAway:ERROR is not working #830
Comments
What build system are you using? Can you confirm that warnings from javac and other Error Prone checkers are coming through? And any particular reason you are on NullAway 0.8.0 and not the latest release (0.10.14)? 0.8.0 is a couple years old. |
|
To fix the 0.10.14 crash, you need to have the I see our instructions for running NullAway with Bazel are quite outdated. It'd be good to update them, once we figure out these issues. |
Adding org.checkerframework:dataflow-nullaway:3.38.0 resolved the issue but I still do not see the default warnings. |
@hemanthbsridhar unfortunately I am not a Bazel expert and so I don't really know what is going on. I can tell you error reporting in NullAway uses standard Error Prone APIs, so if you see warnings from other Error Prone checkers, you should also see them from NullAway. If you can create a standalone GitHub repo that reproduces the problem, we can try to investigate further. |
Well I'm building with Maven and in my case I get output like |
For Maven (as for Bazel) a self-contained public example to reproduce would be helpful. |
Do you have a counter-example? A template for me to tweak? |
For Maven hopefully something like this still works, with updated version numbers: https://github.com/uber/NullAway/wiki/Configuration#maven If you're using an Error Prone version more recent than 2.10.0 then the jdk8 stuff isn't relevant as recent Error Prone versions do not run on JDK 8. |
I was working off that. Its a simple matter from my side: my other bugpatterns appear as I would expect, e.g. |
I tested this myself and found that the version of the Maven Compiler Plugin is key. 3.10.1 is broken for printing warnings, but 3.11.0 works. I've updated our Maven example accordingly. Here is a sample repo where if you run Unfortunately this still doesn't help the Bazel issue. But for that one, I expect that, like this one, the issue is common to all Error Prone checks, not just NullAway. So I am going to suggest opening an issue on the Error Prone repo, and I will close this one. If you find evidence this is NullAway-specific, please re-open. And thanks for reporting this. |
I found that with 3.10.1, Error Prone (and NullAway) warnings aren't even printed (!). Some related discussion at uber/NullAway#830. I created a relevant sample repo: https://github.com/msridhar/ep-maven-test-warnings You can compare running `mvn clean compile` as is with changing [this line](https://github.com/msridhar/ep-maven-test-warnings/blob/main/pom.xml#L23) to be `3.10.1`; with the latter version many fewer warnings are printed, and no Error Prone warnings are printed as far as I can see. I'm open to adding text that warns users off of versions earlier than 3.11.0 if we think that is warranted. Fixes #4162 COPYBARA_INTEGRATE_REVIEW=#4162 from msridhar:change-mvn-compiler-plugin-version 4164e56 PiperOrigin-RevId: 578269205
Bug :
nullaway Version : 0.8.0
According to the documentation, the default behaviour should show the problems as warnings.
when we don't provide '-Xep:NullAway:ERROR' or when we provide '-Xep:NullAway:WARN', the issues are not coming as warning in the logs.
This works fine when '-Xep:NullAway:ERROR' is provided
BUILD.bazel
Documentation
The text was updated successfully, but these errors were encountered: