What’s New in MPS 2021.3

MPS 2021.3 comes with Coderules, experimental Kotlin support, Java lambdas, a bunch of VCS improvements, and much more.

Coderules

It’s no secret that we have been working on a new type system for some years. The path to achieving this hasn’t been easy or straightforward, but we finally have something to show. Coderules is still in Beta, which is why it’s not bundled with MPS.

As this is an entire subsystem, we have prepared an online course that walks you through its fundamentals.

Go to course

Experimental Kotlin language support

Experimental Kotlin language support

An experimental Kotlin implementation is now bundled with MPS. Although it supports most of the structure elements in the language (and their text generation), it remains only partially supported.

Learn more.

Hide revision action in annotate

Hide revision action in annotate

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.

Learn more.

Optimization of Annotate revision 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

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

Short change descriptions in tooltips in Diff dialog

We’ve introduced a new action that can change the description of the changes in the Diff dialog tooltips. The description is shorter and more readable.

Enhanced editor tooltips
Client sponsored

Now it’s possible to click on the links inside the tooltips, and the tooltips popup window stays inside the main application window. You can also scroll inside a tooltip if it has a lot of text.

New diff algorithm in the merge process

New diff algorithm in the merge process
Client sponsored

The new algorithm was developed to find conflicting, non-conflicting, and symmetric changes for changes of new types. We’ve introduced a UI mechanism for switching between the algorithms with and without node movement tracking in the Merge window.

Learn more.

Nested wrapping and unwrapping changes detected in diff dialog

Nested wrapping and unwrapping changes detected in diff dialog
Client sponsored

Even though it was previously possible to detect internal insertions, deletions, and moves inside the wrapping or unwrapping change, nested wrapping changes were not detected. Now it is possible to detect nested wrapping and unwrapping changes.

Reorganized VCS settings

Reorganized VCS settings

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 the settings into sections that account for the most important processes: Commit, Push, and Update.

Generation of compatible closures into Java lambdas

Generation of compatible closures into Java lambdas
Client sponsored

MPS closures are now generated into Java lambda expressions if they are compatible. Incompatibilities include the usage of:

  • Yield operations
  • "Functional" abstract classes
  • Annotations
  • Local variables conflicting with parent scope

Learn more.

Mapping label for tuples

Mapping label for tuples
Client sponsored

We’ve introduced experimental functionality to use a pair of nodes as a key for the mapping, node<>, node<> --> node<>. This is useful in situations where you need to support two source concepts. If you would like to give it a try, it’s used the same way you use labels with one key node.

Learn more.

Access all values of two key mappings in generators
Client sponsored

Besides the Mapping label for tuples feature, we now support a query to access all known mappings for given two keys, genContext.get output list LABEL for (node1, node2).

Performance trace reports time spent resolving dynamic references

Because of numerous scope evaluations, resolving dynamic references often slows down model-to-model transformation. Performance trace hides this vital piece of information under a vague “restoring references” title. Now, the time spent restoring dynamic references is reported separately from time spent restoring regular or static references.

Project migration improvements

Project migration improvements

We have simplified the process of creating project migrations in this release. You only need to create a plugin solution, write the migration and application plugin root, and include this plugin solution with the build script.

Ant <migrate> task improvements

The Ant <migrate> task now supports multiple project specifications and can migrate several projects at once. You can either use nested <project path="”/> elements or regular Ant’s <dirset> to enumerate project locations for the task.

Checkout and Rebase onto Current for remote branches

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, but in MPS 2021.3 you can use it with remote branches as well.

New Changes tool window

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

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.

Migration Guide 2021.3

As with every release, we have prepared the Migration guide for a smooth transition from an older version.