The Xtext Team happily announces the availability of release 2.16.0. This release is part of the Eclipse 2018-12 simultaneous release, which is the 2nd release with the new quarterly release cadence. Besides stability and performance again, compatibility with the new Eclipse release was on the top index of work items.
Accelerated Release Cycle
The new release cadence is keeping the Xtext Team busy. Since we decided not only to participate in Eclipse’s quarterly simultaneous release (SimRel), but also deliver in the same rate new Xtext releases, we have to improve our internal processes. This means to constantly improve the release procedure and working on automation of recurring tasks for the release process itself, but also for maintenance tasks.
While with release 2.15 we entered the SimRel quite late near to its release, we managed to enter the release train already with M1 this time, and delivered also for M3. This helps our adopters within the SimRel to integrate with the upcoming release early and provide valuable integration feedback before the release.
Preparing for Java 11
Java 11 is out now and we planned to fully support this LTS release version with 2.16 already. Xtext depends on many components that have themselves be ready and available to run with Java 11: JDT, Gradle, Tycho, Maven, ASM, … It turned out that we could not wait or integrate all of them for 2.16 already, so it was decided to re-target full support to 2.17.
With Xtext 2.16, most preparation steps have been done already and many components have been upgraded: Xtext integrates with latest JDT, Gradle 4.10, Tycho 1.3, ASM 7. The remaining tasks are tracked in issue #1182.
Xtext 2.16 is already ready to perform on a Java 11 VM unless the source level for used libraries and the required execution environment are targeting a lower language level.
R.I.P. Ancient Eclipse Versions!
Already Xtext 2.15 was declared to require Eclipse Oxygen 3.a as minimal platform version. With 2.16 Xtext now defined lower bound version constraints for all bundle dependencies from Eclipse Platform to their Oxygen.3a version.
As a consequence, Xtext 2.16 can’t be installed on a lower platform version anymore! We decided to cut off the older platform versions to leverage also newer APIs from the platform. And, to be honest, the team has not the capacity to support integration problems arising from a mixture of brand-new Xtext release with Eclipse versions from the stone age.
Quickfix Testing API
org.eclipse.xtext.ui.testing bundle was extended by a new base class for testing quick fixes, AbstractQuickfixTest. This class provided a convenient way to test the availability of specific quick fixes in code sequences and their effect on the code when applied. This is done by using the provided method.
public void testQuickfixesOn(CharSequence model, String issueCode, Quickfix... quickfixes)
The usage of this API is best demonstrated by the following example from Xtext’s Domainmodel example language:
As you can see, the approach is to provide some DSL snippet which contains issues (like lower case entity name in
fix_invalid_entity_name()). For this snippet the
testQuickfixesOn() method is invoked for the
INVALID_TYPE_NAME issue code and expects the quick fixes’ name, description and the capitalized name after appliance.
Take the example’s Quickfix tests as a blue print and you should be able to easily test your implemented quick fixes now. Besides the Domainmodel example we have extended also the Statemachine and Home Automation example projects.
Latest Language Server Protocol Support
Xtext 2.16 is built against LSP4J 0.6, which reflects the latest state of the Language Server Protocol. With this release, Xtext now supports hierarchical document symbols. This has been added with LSP 3.10.
Xtext language servers can now use different strategies for the
exit command. The default behavior to handle this command was to terminate the VM by calling
System.exit(). While this is the desired behavior when running the language server in a separate process than the client, it is harmful when language client and server are sharing the same VM. Therefore a new interface
ILanguageServerShutdownAndExitHandler has been introduced, whose default implementation preserves the previous behavior. The
ILanguageServerShutdownAndExitHandler.NullImpl can be bound for languages which are used in embedded scenarios, where the VM has to be kept alive.
Xtext’s incremental project builder XtextBuilder used the workspace root as scheduling rule so far, like most commonly used builders in the Eclipse platform did also. This meant that while building Xtext projects the builder held an exclusive lock on the workspace.
Starting with Eclipse 4.8 Photon, the project build has been enabled to support builders with a more “relaxed” scheduling strategy. This potentially allows projects in the workspace to be built in parallel, when they do not depend on each other and all configured builders are computing a more fine grained locking strategy.
The XtextBuilder has been extended to support a variety of different scheduling strategies. This is an experimental feature for now, which needs activation by a preference that is not exposed to the UI.
org.eclipse.xtext.builder/schedulingrule preference the XtextBuilder can be configured to use one of these locking strategies:
- WORKSPACE: Workspace root scheduling. This is the default value.
- ALL_XTEXT_PROJECTS: Lock all projects with Xtext nature configured. Allows projects of other natures to be built in parallel.
- PROJECT: Locks the currently built project.
- NULL: No locking.
Growing The Team
We are happy that more people are helping the team with active contributions. Those who show their dedication to the project and deliver numerous valuable patches and features deserve their inclusion to the development team.
As a result, the Xtext team is welcoming two new committers who have earned their nomination: Tamas Miklossy and Akos Kitta. Tamas’ dedication is mainly in the area of contributions to the Xtend language, Testing APIs, Example projects and maintenance work. Akos mainly works on the LSP integration. A warm welcome to them! With their help the project can keep up its high development speed.
Are you the next Xtext super hero?
After The Release Is Before The Release
With the Xtext 2.16 release available, we immediately start with working on 2.17. As mentioned above, full Java 11 support is on top of our list.
Further you can expect that we’ll provide Maven BOMs soon, which eases the configuration of compatible dependencies. This has been addressed as a consequence of some trouble users have with incompatible dependencies in their Maven and Gradle builds.
As we are continuing to participate in Eclipse’s simultaneous release, 2.17 release dates are already known:
- 2.17.0.M1: Jan 14th 2019
- 2.17.0.M2: Feb 4th 2019
- 2.17.0.M3: Feb 25th 2019
- 2.17.0 Final Release: Mar 3th 2019
Save the date!
Xtext 2.16 is available now on the release update site, through the Eclipse Marketplace and on Maven Central. Besides the features highlighted by this article, more information on the release can be gathered from the Xtext and Xtend release notes.
Having questions or feedback on Eclipse Xtext? The Xtext team is eager to hear you! We are working hard to improve Xtext continuously and deliver it to you now even faster. Do you have something that you are missing? We are happily guiding you to add your own contribution, or get in contact with us to get support for adding features you need.