Per-component repositories

iris clark iris at sun.com
Thu Mar 6 20:00:08 PST 2008


Hi.

> > For instance, as a developer in Core Libraries, it would seem that I only need
> > to retrieve the "jdk" portion of the repository since that's where the
> > implementation of those classes resides. However, I would need to be pretty
> > confident to not do a full build of the entire forest before I did my commit.
> 
> I would like to offer the following guidance.
> 
> If you're changing the layout of any part of the JDK, you really should 
> do a full build on the whole repository, at least including images 
> (generally as the last step before integrating).  Yes, the file may have 
> compiled correctly, but then something such as the images target broke, 
> or the file wasn't included in the final rt.jar.  There's a lot more 
> than javac to be concerned with when you're moving target files around. 
>   Gatekeepers don't particularly enjoy last minute images target 
> breakage.  ;)

I think that thare are many types of changes for which I'd advise full
builds prior to commit.  Off the top of my head, here are a few more
cases that I've run into:

- A new class is added as part of the change.  The unqualified class
  name is identical to that of another class in a different package.
  If any existing class in the JDK happens to do a star import of
  both packages and uses the unqualified class name, the compiler
  will report an ambiguity.  Here's a short example:

    import java.awt.*;
    import java.util.*;

    class A extends List {}

  Believe it or not, this sort of thing happended during my very
  first integration!

- If you work with incremental builds and are modifing any files which
  are built during bootstrap, it's possible that those files may
  compile just fine after bootstrap, but they won't compile during
  bootstrap.

- Just because an API isn't public, doesn't mean that other parts of
  the JDK don't depend on its presence or precise semantics.  At best,
  this is found during a full build.  At worst the problem isn't found
  until an application/test is run.  (Yes, that means they were
  probably using reflection.)  There are multiple horror stories. 

I'd say that these cases are rare, but I'm sure any gatekeeper
("integrator" if you're using the old terminology) will appreciate if
a full build was done at some point prior to commit.

I stand by my statement that any developer working with only part of
the forest needs to be extremely comfortable with the build structure
and any potential side-effects their modifications may cause.

iris



More information about the guide-discuss mailing list