Java 16: Migration to Git and GitHub gets closer

Share

There is no timetable for Java 16—there’s no official project page either. You could be forgiven for doing a double-take when you saw the headline. However, if you have even a little interest in developments in the Java universe, you already know that JDK 16 is scheduled for release in March 2021. And even if Java 15 is still in focus, it makes sense that with the last version before the next Long Term Support Release (Java 17, due September 2021) an important and momentous step will be taken. Of course, what we are talking about is migrating to Git as the version control system (VCS) and GitHub as the hosting platform.

Java 16 on Git and GitHub

The reasons for the move to Git are not trivial: Mercurial is still in use in many places, but the VCS seems a bit outdated, especially if you’ve already worked with Git: When moving a file, Mercurial creates a complete copy of the original file and saves it. If you move a lot of files, like when developing a JDK (for JDK 9 a particularly large number of files were moved because of the new module system), this results in extremely large amounts of memory. JDK 8 had a size of 412 megabytes, JDK 9 had already grown to 800 megabytes and JDK 10 has over 1.5 GB. Additionally, the way of performing code reviews, currently still done via mailing lists, is not what you might call modern. Git offers more adequate alternatives here.

It eventually reached the point where Project Skara was put forward. Not to if there’s an alternative to Mercurial, but rather which alternative version control system would eventually replace Mercurial. After the first series of tests, the decision to use Git was made fairly easily. JEP 357 was the result of this evaluation.

The goal of the JEP is to move all OpenJDK source code repositories from Mercurial to Git. The entire history of all Java versions (including tags) is to be retained, which means that a major move, as already known from the move of Jakarta EE, is imminent. However, this is made easier by the preparatory work that has already been done in terms of tools: Several CLI and import/export tools are available and are open source. For the tools jcheck, webrev and defpath there are already backwards-compatible prototypes and the new tool, git-translate, also exists as a prototype.

SEE ALSO: Spring Boot 2.3 enhances Docker support with new features

With JEP 369, GitHub was officially announced as the designated hosting platform. Although Project Skara’s tooling is compatible with GitLab on the server side and Git and Mercurial on the client side, GitHub was chosen as the platform of choice. Erik Duveblad and Joe Darcy wrote about the reasons why:

The motivation for choosing GitHub is that is excels at all three primary reasons for choosing an external provider. GitHub’s performance is as good as or superior to other providers, it is the world’s largest source-code hosting service (50 million users as of May 2020), and it has one of the most extensive APIs.

GitHub allows developers to create and review pull requests and comment on them directly from the Emacs, VS Code and Atom editors. When it comes to IDEs, IntelliJ, Eclipse and Visual Studio tools in particular provide excellent support for GitHub. In addition, there are a number of other convenient tools that make working with Git and GitHub easier, such as GitHub Desktop, which is available open source.

What’s the current situation?

In a status update, Robin Westberg and Erik Duveblad from the Java Platform Group gave insight into the work that has already been done in the course of Project Skara. More than 70,000 commits have already been converted, more than 5,000 emails sent, more than 2100 so-called webrevs created. In each case more than 1,000 pull requests have been created or commits integrated. The Skara project has also already had some successes in terms of releases: The OpenJFX project has already been hosted on GitHub and released on Git, two EA builds of Project Loom have also been released.

SEE ALSO: An Introduction to BDA for Java Developers

The Skara project itself is driven by 15 developers and consists of 98.8% Java code. Another interesting insight is that the largest pull request consisted of 3976 commits. The PR’s webrevs had a size of 2.1 gigabytes – quite impressive figures. The following list shows which projects have already moved:

  • OpenJFX
  • OpenJMC
  • Mobile
  • Loom
  • Panama
  • Metropolis
  • Valhalla
  • Amber
  • Tsan
  • ZGC
  • Lanai
  • Skara
  • Code Tools (JTHarness, Jcov, Asmtools)

Outlook: JDK 16 on Git/GitHub?

Since the two JEPs have now officially been awarded the status “Proposed to Target: JDK 16”, it is also possible to roughly predict when Oracle and the JDK team plan to make the move. The reason for the “hurry” is probably the LTS version that follows Java 16, JDK 17. It is understandable that they wouldn’t want to do the move with a Long Term Support Release. The current projects that are at least still pending are the JDK itself, the JDK updates and the code tools.

More information about Project Skara and the move to Git / GitHub can be found in the official project wiki and in the descriptions of JEP 357 and JEP 369. The source code for Project Skara is available on GitHub and the skara-dev mailing list is a good place to discuss the project. The latest information (as of May 7, 2020) from Project Skara can be found in the slides of the Skara team’s update meeting.

The post Java 16: Migration to Git and GitHub gets closer appeared first on JAXenter.

Source : JAXenter