----- Original Message -----
> On 8/24/12 2:42 AM, Andrew Hughes wrote:
> > However, once the whole build is warning free, would it not be
> > preferable
> > to remove these and just set JAVAC_WARNINGS_FATAL=true when doing
> > development
> > builds?
> >
> > The problem I see is someone new coming to OpenJDK and not being
> > able to
> > simply build it (with no changes) because a new warnings has
> > appeared
> > and is being treated as an error.  This is less of a problem with
> > javac
> > as we control its development, and the JDK will use the javac built
> > in the
> > langtools step in most cases.  But, generally, -Werror is something
> > you
> > should choose to enable, with the intention of fixing failures, not
> > something
> > that should be forced on everyone building the code.
> 
> Our experience is that when -Werror is off by default, warnings tend
> to be
> introduced inadvertently. In the time we've been working on warnings
> cleanup,
> I've noticed the warnings count creeping up in areas of the build
> that don't
> have -Werror enabled. If it weren't for the implicit compilation
> issue,
> enabling -Werror incrementally as areas of the build are cleared
> would have
> been a good way to ensure that we make steady progress without any
> backsliding.
> 

But presumably these would be removed when everything is warning free?
-Werror should not be the default for everyone building OpenJDK, who then
end up having to fix or workaround issues which are nothing to do with them.
It's easy enough for those who want to check we don't regress to turn on
-Werror throughout, once everything is warning free.

> > On a related topic, it would be nice if javadoc could also support
> > -Werror
> > as I constantly see warnings reappearing in the documentation.
> 
> Yes, javadoc warnings are another *huge* problem.
> 

Yes, I see much more regression on this than code warnings (though I guess
this is because most are hidden by javac's defaults).

> >>       SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true
> >>
> >> and this is **not** overridable on the command line. That's wrong.
> >> If
> >> these are
> >> causing problems for you, please do submit patches.
> >
> > Yes, that's what we have in java/tools and is why
> > JAVAC_WARNINGS_FATAL=false
> > doesn't completely remove -Werror at present.  I'll post a webrev
> > of the change
> > I have for this.
> 
> Great, looking forward to this.
> 
> s'marks
> 
> 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07

Reply via email to