On Sun, Dec 4, 2011 at 12:24 AM, Brendan Eich <
bre...@mozilla.com> wrote:
>
>> But my long-term goal here is to get zero warnings, or as close as
>> feasible, for the entire browser
>
> You want a wider channel, probably m.d.platform.
I deliberately avoided that because I figure if I can't get this
happening in the JS engine where the situation is already good, the
broader effort is doomed.
> FWIW, we've been here before. The project goes back 13+ years and we have had several attempts at zero-warning tolerance (the one I remember best, Steve Lamm drove -- don't have time to bug-dive for details). These attempts failed.
>
> It's hard to get a large group acting coherently, especially with warnings sometimes crying wolf, especially with minority-share platforms (GCC-based, in the old days also a freakshow of proprietary Unix compilers) not seeing the same warnings the majority-share one (Windows) sees. (Majority-share now may be Mac OS X for all I know; doesn't affect the argument.)
Yep,
https://bugzilla.mozilla.org/show_bug.cgi?id=187528 is a sad bug
that will never be closed if a new approach isn't taken. That's why I
want it automated, to force the group to act coherently, like they do
with things like compile errors and test failures. And that's why I
only want it on TBPL, so unusual platforms aren't affected.
> The problem remains the different compilers don't agree on warnings.
They don't even agree on compile errors, but we live with that -- you
just test patches on try server before landing them. In my mind the
warning situation is no different, once you get down to zero warnings.
I guess you think that warnings on platforms other than yours will be
much more common than errors on platforms other than yours? Maybe
you're right, but I don't think we can ever know without trying it,
which is why I suggested the two week trial period.
> Can we prioritize the "bad" warnings that all agree on.
>
> Unused variables are "bad" -- can we get a count of those for all top tier platforms for a Firefox build, to see how bad the problem is?
I realized I'm tilting at a large windmill here, so I'm happy to be
pragmatic. If we can make one useful warning fatal on one platform
(e.g. -Wshadow on Mac/GCC) that would be a useful toe-hold and
precedent. I originally was aiming for a larger initial toe-hold that
covered the entire JS engine on all TBPL platforms, but clearly I'm
not getting buy-in on that.
(BTW, if you forget a return statement in a non-void function that's
an error in GCC Mozilla builds, but I thought it was a warning... has
the default GCC behaviour changed, or have we made that warning fatal
somehow?)
Nick