The future of partial builds
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Sep 10 15:15:54 UTC 2012
Magnus,
I'm guessing that most developers use partial builds.
In the langtools/ world, we only build the langtools component, and even
then, sometimes only javac. We can then use the result to run our
tests. We do not want to -- and would strongly resist having to --
rebuild all of JDK every time we time we edit javac.
In the jdk/ world, developers go as far as building build/classes, and
avoid the downstream steps of building rt.jar and ct.sym.
-- Jon
On 09/10/2012 04:26 AM, Magnus Ihse Bursie wrote:
> I'd like to start a discussion about the partial builds; what problem
> they solve and the best way to solve these problems in the new
> build-infra world.
>
> I'm currently investigating on how to handle the equivalence to
> partial builds in the new build system. My goal is to see to it that
> the new build system does not offer any loss of functionality when
> developing in the JDK -- after all, it is supposed to be a
> improvement, not a step backwards.
>
> However, the current way of doing partial builds is probably not
> suitable for the new build system.
>
> Therefore, I'd like to take a step back and get it down to a bit more
> of a functional spec, specifying some common scenarios and
> requirements on work.
>
> As I understand it, there are effectively two tricks which are used in
> the current build system:
>
> 1) "Partial builds". This means that you check out just a single
> sub-repo, not the complete forest, and build just that repo. Build
> artifacts that are needed from other repos are copied from an external
> binary blob, the "import JDK".
>
> 2) "Subdirectory builds" (not sure if this trick has any well-known
> name). This means that you use the fact that the makefiles are
> organised hierarchically, and do e.g. "cd jdk/make/java/nio ; make" to
> re-build just the NIO files. For this trick to work, you need to know
> what makefile builds the files you are working with.
>
> Trick 1) is used to avoid spending time on building other repos than
> the one you're interested in, and trick 2) is used to avoid spending
> time on building other parts of the repo, apart from the subset of the
> repo you're working with.
>
> Is this a somewhat correct understanding? Am I missing something? Are
> there some other reason apart from speeding up the build to do partial
> builds? How many users out there are actually using partial builds?
>
> /Magnus
More information about the build-dev
mailing list