Picking its JetBrains: Platform gets domain-specific with MPS 2021.1

Picking its JetBrains: Platform gets domain-specific with MPS 2021.1

JetBrains has released MPS 2021.1, the latest iteration of its workbench platform for creating domain-specific languages, with various enhancements to the editor, version control system and the generator.

MPS, or Meta Programming System, is a specialised language workbench that enables organisations to design their own domain specific language for creating code, and compile that into target languages of choice, such as Java, C or C#. #. You can download it here from the JetBrains site.

Release 2021.1 of MPS delivers some cosmetic changes to the editor, you can now adjust the font size, as well as fine-tune the weight of the main and bold font styles used. Meanwhile, the indent layout is now incremental in some core cases, which will reduce the rendering time for big models in languages that mainly use the indent layout, such as BaseLanguage.

In the version control system, a new algorithm for calculating revision changes with movement tracking is now used for root annotations. Annotated cells also now have a special context menu group when the annotation column is open. The Diff dialog also shows merged commits in the Git log. The viewer displays three panels – the center panel for the merged model, and the left and right panels for the models of the two merged branches.

Additions

The team also made changes in the root annotation and root/node history algorithms. These take into consideration the revisions graph when formulating change history. Previously, they based this on the ordered list of file revisions, and calculated the changes for the root between two adjacent revisions, which could lead to errors if the revisions were from two different branches, according to JetBrains.

In the generator, it is now possible to refer to the input node of a LOOP macro by using a LOOP.inputNode expression, removing the need to use a VAR macro. Meanwhile, there is a new mechanism for including languages or generators that are unknown to the plan designer. With the transform statement, the language designer may include a language that targets or extends a given one.

Other changes can be seen in the approach to Java compilation of MPS modules. JetBrains has switched the MPS Java compiler infrastructure to use the javax.tools.JavaCompiler set of APIs. So MPS can now use any compiler that implements this standard API. As of this release, MPS runs with the default compiler configured for this API, with the option to use the Eclipse Compiler for Java (ECJ), if present.

Among the other improvements in MPS 2021.1 is Apple Silicon support for Macs that have an M1 chip, enhanced accessibility features, improved expressions in lang.smodel, plus numerous bug fixes.