-
Notifications
You must be signed in to change notification settings - Fork 745
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
Request: better docs for InjectOnBugCheckers #3706
Comments
As of this release the I suspect that the new However, if one adds |
The context is that we are investigating using guice to instantiate bugcheckers, instead of relying on what's effectively a home-grown DI implementation: #3701 |
Would #3701 basically need us to provide different versions of the core NullAway class/jar before and after a certain EP version? As of right now, we support running NullAway with any EP version between 2.4.0 and 2.18.0 (and test at least the extremes in our CI). Moving the minimum supported EP version is certainly doable, but there might be a few moving pieces with that. In general, there are codebases we want to support that might not always be on the latest EP release, so I wonder what's the path for developing a third-party EP checker that works on pre- and post-Guice EP releases? |
@lazaroclapp I'd like to avoid having this be an abrupt breaking change, so if there are ways to make this less invasive / easier to absorb, I'm open to suggestions. I think this logic ensures that the error-prone/check_api/src/main/java/com/google/errorprone/scanner/ScannerSupplierImpl.java Lines 75 to 78 in d8a0abc
Also, I think adding the |
Ok, if I follow that correctly, then I think the above seems quite sufficient for us to maintain compatibility with multiple EP versions even once #3701 lands. Thanks! Though, if I understand this correctly:
Then I assume for a while we would need to suppress |
I think maybe we should just teach |
…tructors See #3706 (comment) PiperOrigin-RevId: 501031337
…tructors See #3706 (comment) PiperOrigin-RevId: 501041647
I just got a warning from the new
InjectOnBugCheckers
checker when updating NullAway to EP 2.18.0. But, I'm not sure why the missing@Inject
annotation on the bug checker constructor is a problem. Could the docs be updated to add a bit more explanation? I don't want to have NullAway take another dependence to get thejavax.inject.Inject
annotation, so we'd probably only fix this if it's serious.The text was updated successfully, but these errors were encountered: