The future of partial builds

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Mon Sep 10 11:26:10 UTC 2012


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