The future of partial builds
Chris Hegarty
chris.hegarty at oracle.com
Mon Sep 10 11:59:03 UTC 2012
On 10/09/2012 12:26, 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?
I do partial and subdirectory incremental builds. Typically of the jdk
repo. The main reason is to speed up the development cycle. Subdirectory
incremental builds can complete in a few seconds, and this can aide a
productive development cycle.
I favor partial over full builds as some of the platforms/hardware we
have can take much longer to build all repos, when they are of very
little interest to what I happen to be working on at the time. Yes,
there are risks, I both understand and accept them.
I would like to see some flavor of these supported in the new-build system.
-Chris.
>
> /Magnus
More information about the build-dev
mailing list