Early Access Program for MPS 2022.2
As previously mentioned, we decided to skip MPS 2022.1 as we were too busy fixing issues from the last release and didn’t have enough time to prepare the new functionality. Now we have new features to present to give you a glimpse of what’s to come in MPS 2022.2.
Annotations in Inspector
Annotations are now accessible from the Inspector window, and the annotation process will start for the entire root. This action can be accessed by right-clicking on the left border of the Inspector window. The Annotation will open in both the Inspector editor and the main editor.
Improved support in MPS Kotlin
A lot of edition issues have been fixed to provide a better typing experience, such as:
- Lambda literals:
- Support of the implicit “it” parameter.
- Lambdas whose type has a receiver (e.g. “Receiver.() -> Unit”) will properly use that receiver type as an implicit “this” inside the body of the lambda.
- Scopes have been refactored to support more use cases (e.g. custom receiver types) and improve filtering (fewer duplications, access to hidden functions).
- Support for deconstructing operators by typesystem.
- Number literals: easier insertion of floats and long, and transition between unsigned and signed numbers.
- String literals: All strings can be switched from single to multiline by pressing enter in a string literal; some insertion issues have been fixed.
- Kotlin stubs support loading of annotations and function types with receiver (eg. “T.() -> R” which were incorrectly loaded as “(T) -> R”, such as the with() function).
Due to some structural changes, several migrations are provided with the language:
- Statement support has been made generic in theIStatementHolder interface; other concepts using statements on their own have been migrated to use this concept.
- String literal and multiline literal have been merged into a single string literal concept.
- Inheritance modifier (final, abstract…) on function declarations is now mandatory because of the usage of the Inheritable interface; declarations will be migrated accordingly.
- Support for deconstructing variables has been grouped under the IDeconstructingDeclarations interface; for statement and lambda multi-parameter are migrated to use it.
- Concepts with receiver types no longer use the ReceiverType concept (which is an expression referring to a type) and hold the type directly.
- Unsigned, Long and Integer literal concepts have been grouped under the IntegerLiteral concept (which uses boolean flags). Moreover, negative number literals are no longer supported and must be created using the unary minus concept.
SModel language for MPS Kotlin
SModel support has been brought to MPS Kotlin, with the new jetbrains.mps.kotlin.smodel language. Along with the increased compilation support, it allows for the usage of Kotlin code in language modules (as helper classes for instance).
On top of regular types (node, concept, links, references), it leverages the increased flexibility of MPS Kotlin to bring concept-type parameters. Functions, variables, and classes can now declare and use such parameters and reuse them in their internal types, which allows for easier typing and leverages Kotlin smart casts.
Kotlin compilation updates
Kotlin compilation support has been improved with better persistence. As a result, Kotlin classes are no longer erased when MPS is restarted.
A new option has been added in build scripts to mark a module to be compiled with the Kotlin compiler. Insertion of this flag is manual – no automatic check is currently available to set it to true. The flag should be added when a module containing Kotlin files is going to be compiled to JVM.
Text styles available in BaseLanguage comments
When adding comments to the BaseLanguage, it is now possible to customize them further with text style. Comments support bold, non-italics, underlined, and bold-non-italics styles.
In BaseLanguage, it is now possible to do post-fix transformations that allow you to transform the code by appending some text to the expression. This saves developers time, as they do not have to navigate the cursor to the front of the expression or select the expression in order to apply a transformation.
That’s it for now. Try the new functionality and feel free to give us feedback. The release of MPS 2022.2 is coming soon, so stay tuned!
Your JetBrains MPS team
Subscribe to Blog updates
The MPS 2023.3 Release Candidate Is Out
We have just released the Release Candidate for MPS 2023.3. It will give you a taste of the new features that you can expect in MPS 2023.3. The final release is just around the corner! Please test it out on your projects and let us know if you spot anything that we need to fix before the final rele…
The MPS 2023.3 EAP Has Started
The first EAP build for the upcoming MPS 2023.3 is out and ready for you to try. Grab it today and take some of the features planned for the upcoming release for a test drive. DOWNLOAD MPS 2023.2 EAP Here’s what awaits you in this build: Documentation There’s a new Documentation facet to write and g…
MPS 2022.2.2 Is Ready
For MPS users who are still using version 2022.2, we’ve prepared a bug-fix release with several fixes and updates. It also includes additional features, some new and some that have already been published in other MPS versions. Back-ported from master Ability to copy messages from Model Checker The M…
MPS 2021.3.5 Is Out Now
MPS 2021.3.5 has been released with a small batch of useful fixes and an improvement backported from our newest MPS 2023.2 build. Visualize the current values for cells that violate constraints When an invalid value is inserted into a cell, the inserted invalid value is marked in red. Meanwhile, the…