Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Oracle Consolidates the OpenJDK 10 Repository Forest

Oracle Consolidates the OpenJDK 10 Repository Forest

Joe Darcy, technical lead for infrastructure in JDK at Oracle, has announced the final consolidation of repositories for OpenJDK 10. The move, proposed almost a year ago, aims to reduce the overhead of managing the forest of interdependent repositories that OpenJDK has historically been split into. OpenJDK 9 and previous versions will remain a forest. As a result, tools have been created to move changes across consolidated and unconsolidated versions.

Up to this consolidation exercise, OpenJDK was split into multiple different Mercurial repositories (usually referred to as Hg repositories) that contained the main components of the platform, namely:

This created several problems, including the inability to apply bug fixes across repositories in an atomic manner. After the consolidation has completed, there will be only one repository replicated in three lines of development:

Client and HotSpot lines of development also contain the full OpenJDK repository, but they are kept as different development lines due to the fact that work on these areas doesn't tend to impact or be impacted by work in other areas of OpenJDK; keeping a separate line of development that only synchronized with master when needed makes development of Client and HotSpot code easier. 

The consolidation will also simplify some common development tasks. For instance, checking out a local copy of a repository forest currently requires either the use of tclone (part of the tree extension for Hg to handle a forest of repositories), or the script, whereas in the consolidated structure a simple checkout will do. Another example is the creation of a changeset, which up to now required the tool to apply the same Hg command to all repositories in the forest.

Unfortunately, despite the advantages of the new consolidated repository, the days of managing a forest are not completely over. OpenJDK 9 still uses the old forest format, which means that changes that need to be applied to multiple versions of Java (most typically security updates), will need to be applied to both a forest and a consolidated repository. To this effect, Erik Joelsson, software engineer at Oracle and OpenJDK committer, has created a tool capable of transforming a patch from consolidated to unconsolidated format and vice versa.

Finally, projects that are based on OpenJDK 10, such as Amber or Valhalla, were not included in the initial consolidation effort. However, consolidated versions of these are expected to be available soon.

Rate this Article