When I turned findbugs on for the Dataflow worker, it found a number of synchronization issues and some other issues around possibly-bad practices that weren't about nullability. That's the origin of this thread - it really seemed that there's value added even on top of nullability where the bytecode analysis approach is actually inferior to source analysis since it relies crucially on generic support for full expressivity.
As far as nullability + errorprone, my impression is that the best thing to do is https://github.com/uber/NullAway, and I filed https://issues.apache.org/jira/browse/BEAM-6555 for that (and https://issues.apache.org/jira/browse/BEAM-6556 for another, more rigorous one - I didn't file one for Checker framework which does it in the type system because it appeared to hang when I tried it) Kenn On Tue, Feb 5, 2019 at 9:20 AM Reuven Lax <[email protected]> wrote: > How much of the benefit of FindBugs/SpotBugs over Errorprone is simply > because we tell FindBugs to assume a default annotation of NonNull (we set > this in the package-info files). If so, is there no way to tell Errorprone > to do the same thing? > > On Tue, Feb 5, 2019 at 9:18 AM Scott Wegner <[email protected]> wrote: > >> +1 And it seems there is a straightforward migration guide: >> https://spotbugs.readthedocs.io/en/latest/migration.html >> >> >> On Tue, Feb 5, 2019 at 8:27 AM Maximilian Michels <[email protected]> wrote: >> >>> +1 >>> >>> Spotbugs appears to be a fork of Findbugs which is unmaintained: >>> >>> https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2016-November/004321.html >>> >>> On 31.01.19 20:17, Anton Kedin wrote: >>> > It would be nice. How fast is it on Beam codebase? >>> > >>> > Regards, >>> > Anton >>> > >>> > On Thu, Jan 31, 2019 at 10:38 AM Udi Meiri <[email protected] >>> > <mailto:[email protected]>> wrote: >>> > >>> > +1 for spotbugs >>> > >>> > On Thu, Jan 31, 2019 at 5:09 AM Gleb Kanterov <[email protected] >>> > <mailto:[email protected]>> wrote: >>> > >>> > Agree, spotbugs brings static checks that aren't covered in >>> > error-prone, it's a good addition. There are few conflicts >>> > between error-prone and spotbugs, for instance, the approach to >>> > enum switch exhaustiveness, but it can be configured. >>> > >>> > On Thu, Jan 31, 2019 at 10:53 AM Ismaël Mejía < >>> [email protected] >>> > <mailto:[email protected]>> wrote: >>> > >>> > Not a blocker but there is not a spotbugs plugin for >>> IntelliJ. >>> > >>> > On Thu, Jan 31, 2019 at 10:45 AM Ismaël Mejía >>> > <[email protected] <mailto:[email protected]>> wrote: >>> > > >>> > > YES PLEASE let's move to spotbugs ! >>> > > Findbugs has not had a new release in ages, and does not >>> > support Java >>> > > 11 either, so this will address another possible issue. >>> > > >>> > > On Thu, Jan 31, 2019 at 8:28 AM Kenneth Knowles >>> > <[email protected] <mailto:[email protected]>> wrote: >>> > > > >>> > > > Over the last few hours I activated findbugs on the >>> > Dataflow Java worker and fixed or suppressed the errors. >>> > They started around 60 but fixing some uncovered others, >>> > etc. You can see the result at >>> > https://github.com/apache/beam/pull/7684. >>> > > > >>> > > > It has convinced me that findbugs still adds value, >>> > beyond errorprone and nullaway/checker/infer. Quite a few >>> of >>> > the issues were not nullability related, though nullability >>> > remains the most obvious low-hanging fruit where a >>> different >>> > tool would do even better than findbugs. I have not yet >>> > enable "non null by default" which exposes 100+ new bugs in >>> > the worker, at minimum. >>> > > > >>> > > > Are there known blockers for upgrading to spotbugs so >>> > we are depending on an active project? >>> > > > >>> > > > Kenn >>> > >>> > >>> > >>> > -- >>> > Cheers, >>> > Gleb >>> > >>> >> >> >> -- >> >> >> >> >> Got feedback? tinyurl.com/swegner-feedback >> >
