The Early Access Program for MPS 2021.3 is open
Our release of MPS 2021.3 will be delayed until next year. That said, we can’t finish the year without giving you a glimpse of what you can look forward to.
Experimental Kotlin language support
An experimental Kotlin implementation is now bundled with MPS. While it supports most of the structure elements in the language (and their text generation), it still remains only partially supported.
Stubs in common Kotlin code are also supported. On the JVM side, baseLanguage constructs (code and stubs) can be referenced in Kotlin through the jetbrains.mps.kotlin.javaRefs language.
Implementation of the type system has been externalized to MPS-Kotlin-Typesystem, which can be installed as a plugin. There is also simple support for types (without inference and generics) and overload resolution that can be used for editing.
Hide revision action in annotate
Some revisions may contain low-level migrations, and when they affect the whole root, it might be undesirable to see them in the ‘annotate’ column. The existing action Annotate previous revision opens the editor in a separate tab for a root at the selected commit. The new action Hide Revision allows you to exclude a revision from the annotation result in-place and show the result in both the editor and gutter. The excluded revisions can be restored with the opposite action Restore Hidden Revisions.
Information about hidden revisions is displayed in the notification panel at the top of the editor. It is also possible to restore hidden revisions by clicking on the corresponding link in the notification panel.
Optimization of Annotate action results
The Annotate action in MPS is not as fast as the git blame operation for text files since the annotation result is constructed for the models. Annotate revision and Annotate previous revision actions use the same algorithm for constructing the result as the Annotate action and were slow as well. The result for the Annotate revision and Annotate previous revision actions can be constructed instantly using the result obtained from the initial Annotate actions.
Details dialog in merge roots
The Show Details action has been introduced to give more details about the branches during merging. The action is accessible from the Merge revision window.
Short change descriptions in tooltips in Diff dialog
We’ve introduced a new action that can change the description of the Editors of the different branches in the Diff dialog. The description is shorter and more readable.
Generation of compatible closures into Java lambdas
MPS closures are now generated into Java lambda expressions if they are compatible. Incompatibilities include the usage of:
- Yield operations
- “Functional” abstract classes
- Local variables conflicting with parent scope
Some issues may arise from this change:
- Ambiguous calls: undetected in MPS, the Java compiler will report such issues with closures generated as lambdas.
- Closure instances: as a lambda, a closure will create a single instance at runtime, as opposed to anonymous classes that create a new instance every time it’s called (see screenshot below).
Checkout and Rebase onto Current for remote branches
The action to Checkout and Rebase onto Current lets you check out the selected branch and rebase it on top of a branch that is currently checked out. This was possible only for local branches before, while in MPS 2021.3 you can use it with remote branches as well.
Reorganized VCS settings
The VCS settings have been reorganized to make them more discoverable and usable. In Preferences / Settings | Version Control you will now find a list of the available settings to configure your VCS. Additionally, we’ve added a separate node for Directory mappings, and the background operations are now switched on by default.
If you go to the Git node, you’ll notice that we have divided all of the settings into sections that account for the most important processes: Commit, Push, and Update.
New Changes tool window
In MPS 2021.3, the IDE shows the difference between commits in a separate Changes tool window located on the left of the editor.
New Push All up to Here action
This feature allows you to push only the commits you are confident about and leave the rest for later. To use it, pick the commit you want to stop at, right-click on it to call the context menu, and select the new Push All up to Here action.
That’s all for now! We still have more surprises for this release, so stay tuned for more news.
Have a great New Year!
Your JetBrains MPS team
The Drive to Develop