please review 7122061: enable -Werror in various jdk build steps

Stuart Marks stuart.marks at oracle.com
Thu Dec 22 01:51:42 UTC 2011


On 12/20/11 6:28 PM, Stuart Marks wrote:
> On 12/16/11 2:39 AM, Chris Hegarty wrote:
>> On 12/16/11 09:57 AM, Alan Bateman wrote:
>>> Stuart - the changes look okay to me but it would be good to get
>>> confirmation that you've done both full and partial builds with these
>>> changes. Also I think we need confirmation that incremental builds in
>>> each of these areas isn't impacted. My concern is implicit compilation
>>> where compiling code in warning free areas may compile code in areas
>>> that are not warning free yet. Sasha did great work over the summer and
>>> part of his approach was to make warnings fatal in the errors that he
>>> cleaned up. On a couple of occasions we ran into issues where implicit
>>> compilation caused code in areas with warnings to be compiled. Such
>>> issues are usually quick to fix but I'm sure you get my concern.
>>
>> I agree with Alan here, we need to be careful that incremental/partial builds
>> are still ok. We found some issues relating to this in the networking area
>> recently.
>
> OK, I was unaware of the issues with implicit compilation. I've been doing full
> builds (well, just the jdk repo, not the full forest), and my assumption has
> been that it's safe to enable -Werror for any run of javac that had no errors
> during the full build. Indeed, with the -Werror patch applied, a full build
> still succeeds.
>
> Given implicit compilation I can see that a particular run of javac with
> -Werror might end up compiling additional source files that haven't been
> cleared of warnings, resulting in an error. As I understand implicit
> compilation (admittedly I don't understand it very well) anything in the source
> path can be compiled implicitly. From my build logs it looks like -sourcepath
> is provided with essentially all of the source files in the repo. So it looks
> like potentially anything can be implicitly compiled.
>
> My question is, how can we test for this? Aren't there an astronomically large
> number of incremental or partial builds possible?
>
> If there are specific cases that occur often that you think I should test, I'd
> be glad to do so, but otherwise I'm not sure how to proceed.

I dug up a bit of background on this. Apparently Sasha ran across this problem 
back in July and asked about this on net-dev [1]. Discussion continued on 
build-dev [2]. Kurchi later picked up this work and after some discussion got 
it integrated [3].

I didn't see Sasha's original webrev, but he might have fixed all the warnings 
in the java.net package, enabled -Werror in make/java/net/Makefile, and then 
was surprised to find that this build step was (implicitly) compiling files 
that weren't in the java.net package. Kurchi's fix [3] apparently fixed 
warnings in these other files as well before enabling -Werror.

In my proposal to add -Werror, I've ensured that specific runs of javac to 
which -Werror will be added actually have no warnings at all, whether in 
implicitly or explicitly listed files.

I'm also not entirely clear what's meant by "partial" and "incremental" builds. 
I've been doing clean builds, but only in the jdk repo. Is this a "partial" 
build, as opposed to a full forest or "control" build? I'm doing one of those 
now and I'll certainly correct any issues that arise because of -Werror.

Or, is a "partial" build what happens if one descends into a make subdirectory, 
e.g. jdk/make/java/net, and calls "make" from there? I haven't been doing that. 
Should I?

Still trying to figure out what I need to do to move this forward.

s'marks

[1] http://mail.openjdk.java.net/pipermail/net-dev/2011-July/003351.html

[2] http://mail.openjdk.java.net/pipermail/build-dev/2011-August/004943.html

[3] http://mail.openjdk.java.net/pipermail/net-dev/2011-September/003524.html






More information about the build-dev mailing list