-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Update to NullAway 0.12.15 and fix new warnings #36054
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
Conversation
|
FYI @sdeleuze |
b39f321 to
b4ec0ad
Compare
|
I don't think we should upgrade just yet even if this works for framework, see spring-gradle-plugins/nullability-plugin#25 |
|
Hi @snicoll thanks, I commented on the NullAway issue you opened. It might be reasonable to change the nullability-plugin to not enable For context, I'm interested in getting Spring Framework upgraded to NullAway 0.12.15 since we use it as an integration test for NullAway, and that integration test has been failing due to the new warnings that this PR fixes. Nothing critical, though. |
b4ec0ad to
88dd275
Compare
Signed-off-by: Manu Sridharan <msridhar@gmail.com>
88dd275 to
f33fae5
Compare
|
Thanks @msridhar, the code changes LGTM, but I will wait the release of https://github.com/spring-gradle-plugins/nullability-plugin/milestone/9 to merge it instead of the NullAway version override. I have tagged this issue as en enhancement as it will refine the nullability of some of our public APIs. |
This commit also replaces Arch Unit packageInfoShouldBeNullMarked() rule by either configuring requireExplicitNullMarking = false when the whole module does not have JSpecify annotations, or explicit @NullUnmarked when some have and some don't. See spring-projectsgh-36054
|
@rstoyanchev While changing how we check |
The new warnings are a consequence of uber/NullAway#1371, which better detects annotations on type arguments in return types.
Fortunately, the fixes are straightforward. Note that writing
@Nullable Voidis required by JSpecify (see jspecify/jspecify#51). This is not yet checked exhaustively by NullAway, but some instances were caught here.