About the Power of Open Source Development at Eclipse

As a project deeply integrated with Eclipse JDT, Xtext has sometimes also to use internal API. This is, for example, necessary to leverage best performance of accessing Java elements. We try to avoid this whenever possible sometimes even by duplicating the code, and we never faced a problem for several years in this regard.

This October Eclipse released Oxygen.1a, which added Java 9 and JUnit 5 support to the recently released Oxygen.1 release. Java 9 support was a major effort for the JDT team and the fast availability to Eclipse users right after release of Java 9 last month proves the vibrant nature of Eclipse projects and the enthusiasm developers put into their projects. And naturally this feature required some major changes to JDT’s internals.

Small change in JDT – great impact for Xtext users

One of these refactorings lead to a signature change in one of JDT’s internal methods that Xtext makes use of. This is a small change, but crucial for Xtext users. All current productive versions of Xtext including Xtext 2.12, which participates in the Eclipse Oxygen release train, are compiled against this method and Xtext plugins would fail when running on JDT when this method would not be available in the specific signature.

At itemis we care about quality of the Eclipse projects we are involved in. A very valuable source information for us is the Eclipse Automatic Error Reporting System (AERI). We actively scan reports there, since these are real issues real users have out there. Without AERI, the hurdle to report problems was rather high: You need an Eclipse Bugzilla account, find the right category and describe manually your problem. Many issues were not reported then. Now it is just one click to automatically submit a report. And the more users report the same issue, the more prominent this is shown to us developers.

On Monday before the final release candidate there was suddenly a report on a linking problem, which showed the following excerpt in its stack trace:

java.lang.NoSuchMethodError: 
org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots
(Lorg/eclipse/jdt/core/IClasspathEntry;Lorg/eclipse/jdt/internal/compiler/util/ObjectVector;Ljava/
util/HashSet;Lorg/eclipse/jdt/core/IClasspathEntry;ZLjava/util/Map;)V

at org.eclipse.xtext.common.types.access.jdt.JdtTypeProvider.collectSourcePackageFragmentRoots
(JdtTypeProvider.java:539)


From time to time there are similar reports, which usually indicate faulty configurations like a version mixture of Xtext bundles. AERI reports contain some information on the available bundles and their versions in the execution environment, which help identifying the context of the problem. Now this one was strange: It showed the version 3.1.50 of bundle org.eclipse.jdt.core installed. This version was unknown to us – Eclipse Oxygen.1 was delivered with version 3.1.0.

As we detected this problem it was my itemis colleague Christian Dietrich who immediately got into contact with the JDT team to discuss this issue and raised Bug#525462. Stephan Herrmann from the JDT team, also an active Xtext user, and Dani Megert worked with us to address this issue. Finally, it was decided together that the missing method would be added again. The release of Oxygen.1a was already in progress, and developers were informed through the cross-project mailing list about this important issue.

Fortunately the Eclipse Platform team agreed to respin the whole Oxygen.1a simultaneous release. There were two other issues with the JDT and Maven tooling, and these problems are solved with the Oxygen.1a release before all users are affected.

We from the Xtext team will now carefully review and reduce internal API usage and work together with the JDT team to find proper replacements or evolve suitable public API where it is missing. Thanks to Christian the issue was immediately resolved in Xtext’s source, so that upcoming Xtext 2.13 already does not use this specific internal API anymore.

Since Xtext is used in many different release versions out there it will take time until the internal API is not used by users out there, although the code base might be clean soon already. Further we will discuss internally and cross-team at EclipseCon how we will detect such situations even earlier. In the past we had builds running against several Eclipse versions, but you can imagine that keeping this alive is eating plenty resources both of developers and build servers. To assure our high support requirements it might be necessary to build this up again.

open-source-team-work.jpg


Eclipse: Open source development at its best

At the time when the problem was detected there were 15 reports of this problem in AERI. Sounds much, but actually this is really just a few. Just consider the case that Oxygen.1a went live without detecting this, all Xtext users would have been affected. It is people like Christian, Stephan and Dani to thank that a disaster was avoided. This again shows the great co-working at Eclipse across projects and across companies.

Speaking of Xtext 2.13, the Xtext team itself is in its final release phase and we’ll release on October 20th, just in time for EclipseCon Europe in Ludwigsburg! If you are attending EclipseCon and have questions on the new release, the future of Xtext or just want to drink a beer with us, come to the itemis booth (booth 13) or later to the bar at Nestor hotel. We can be bribed with a beer to share valuable internal insights and tips for you :)

After this EclipseCon and Xtext release we are not going to rest a moment and will continue to make Xtext even more rock solid and improve its usability, stability and performance. Note that our Xtext team at itemis offers Professional Support Services for Xtext support plans. For your project consider to get us on board, together we can make your project even more successful.

Get Professional Support

About Karsten Thoms

Karsten is a software architect at itemis and part of the Xtext team. He strongly believes that Model Driven Software Development helps to be more efficient in mission critical projects.