MPS 2019.3 Is Released!
This is a special release for us. It’s the first time that we’ve devoted a complete release cycle to product stabilization. In the past, we have always been focused on feature development, and fixing bugs was a secondary concern. While the community always appreciates a release with a lot of features, we also received many requests for more performance improvements and stabilization in general. This was the motivation for trying a release focused mainly on fixing the bugs from our issue tracker.
We reviewed and resolved a total of over 700 issues and made significant improvements to the product. Though we mainly focused on fixing bugs, this doesn’t mean the release lacks new functionality. Check out the main improvements and fixes we’ve made for this release.
Model unloading
In previous versions, MPS wasn’t able to unload models. This meant that if you had been working with MPS for a long time and had accessed many models, all these models would be loaded into memory. So, memory consumption would grow over time, which also affected garbage collector pauses.
Now it’s possible to remove all models from memory explicitly by clicking the memory indicator or by setting a scheduled cleanup in preferences. This feature is currently experimental, and we’ll continue to improve it in future releases.
Concept and Interface conversion
We’ve added a new intention that converts a concept to an interface concept and vice versa. This can be used when creating a language structure, and it does not change usages.
Quick Definition Action
Quick Definition is similar to its counterpart in IntelliJ IDEA. Click on a node, press and hold Ctrl-Shift-I, and you will get a popup with the definition of the node. In this popup, you can navigate, select other nodes, and perform the Find action. This way, you don’t need to open a new tab every time you want to have a quick glance at the node.
Quick Definition works in completion menus as well. If you don’t know what the node refers to, you can press Ctrl-Shift-I and see its definition alongside the completion menu. As you navigate through the completion menu, the contents of the popup will change accordingly.
Standalone generator modules and multiple generators per language
Now you can create more than one generator for a language, and either host them inside a language (as in previous versions) or add them next to a language as a regular top-level module. Using generator plans allows you to take full advantage of multiple generators. To help with the transition, only one of the language generators will continue to be involved for a model without an explicit generation plan. The new generator can be created from the language context menu, and the following dialog has a new checkbox you can use to make it standalone.
Create from usage
Now it’s possible to create concepts, methods, and classes from usages in code. The intention can create a class on new statements, methods in expressions, as well as concepts and interfaces in child/reference roles and in extends/implements.
Generating valid java identifiers from INamedConcepts
A new generator statement allows you to generate a valid Java identifier from any INamedConcept. This will create a unique name by removing illegal symbols, capitalizing, and adding a prefix if needed.
Find Usages: new statement to report arbitrary search results when writing a finder
In previous MPS versions, the add result statement on the finder only allowed for node<>-based search results. Now with add raw result, the language designer can display any result that the Find Usages view is capable of visualizing.
New Plugins from the IntelliJ Platform
- Settings repository – Lets you share your settings between different instances of your IDE.
- Task Management – Allows you to manage your tasks from an issue tracker.
- Change Reminder – Predicts files that you may have forgotten to modify based on your commit history.
What’s been fixed
Generator: control the dynamic reference warning
For a long time, the MPS generator has had the ‘Resort to static reference’ setting, which helps to address performance issues. The MPS generator issues a warning when it tries to resolve a dynamic reference but fails, and this causes a lot of warnings given the fact that not all generators adhere to a strict reference construction approach using label mappings (i.e. they instead stick to plain strings for identifying the reference target).
Therefore, we’ve added a new setting to control whether the warning appears. (“Warn static reference could not replace dynamic”, is off by default). This issue was among those that received the most votes in the Generator subsystem.
‘Resort to static reference’ explained:
When a reference macro gives a string as a reference target, MPS creates a dynamic reference, which is usually much more difficult to resolve because it involves scope construction rather than a regular ‘static’ reference. This option means that the moment MPS gets a dynamic reference, it tries to resolve its target, and, if it is successful, it replaces the dynamic reference with a static one, which preserves scope resolution next time the reference is accessed. Given that there might be quite a few steps/intermediate models, constructing a scope could take a noticeable amount of time, and the use of ‘static’ reference in this case really helps.
JavaStubs loading performance improved
We have significantly improved performance when loading stub models, especially from large sets of jars and jars with highly dependent packages. Loading times are now 2 to 3 times faster on our target project (from 18 seconds down to 6 seconds), and this boost has also been backported to versions 2019.1 and 2019.2
Build language: explicit model roots
MPS used to treat only a specific set of files as models, namely *.mps and *.mpsr. However, with custom model persistence, the file names differ. To make sure that all the necessary model files get bundled when a module is built, there’s an explicit model root declaration for a module in the build script that facilitates custom file name patterns.
Documentation:
The custom-persistence samples and documentation for the new build solution wizard have been updated. The generation-time errors in the Math sample and the broken links on the documentation pages have been fixed. Several dialogs and tool windows have also been corrected.
Base Language:
Binary and octal literals are now supported, and type parameters in Javadocs are handled correctly. Many other issues have been fixed as well.
Quick-fix to update module/model identity objects
There are concepts in the SModel Language that identify models/module and bridge the node to Java. These concepts preserve the names of target objects and names that could become obsolete when a target is renamed. MPS detects outdated names and provides a quick-fix to bring them up to date for objects from SModel Language.
Module Facet update
For a long time, ‘Java’ and ‘Tests’ module facets were unavoidable attributes of a module. Using filesystem locations requires hard-coding them in implementation. We are moving toward giving language designers greater control over various aspects of modules. Therefore, we’ve made a change in MPS to store these facets and their settings explicitly. With the ‘Tests’ module facet, language designers now have complete freedom, and MPS no longer demands that the facet be present for the Language module. To ensure a smooth transition, we still force the Language module to keep the ‘Java’ facet at all times. We are going to lift this restriction in the next release.
The change also helps with module deployment by controlling the deployment platform of a module.
Surround with…
The Surround with… action is now available when multiple nodes are selected. Previously it was enabled only for selections containing a single node.
Show Affected Files action in Root History dialog
For a revision in the root history, you can now look at the other files that were changed in the same revision.
Root History for models in per-root persistence
When it was introduced in 2019.2, the Show Root History action, was only available for roots from models kept in a single file. Now, models in per-root persistence are supported as well.
Update of the Favorites view
The old Favorites view was fairly outdated and full of issues. We decided to get rid of it completely and integrate the stable and well-maintained IntelliJ Platform Favorites view in its place. At the moment, we support modules, models, nodes, and properties as entries that can be added to favorites. We are planning to extend this integration to allow more functionality over the elements from the Favorites view, to improve the control users have over projects and provide them with more ways to access frequently used project elements.
Meta-languages styling
All meta-languages now offer the same style and editing experience with respect to, among other things, keyboard navigation, placeholder cell behavior in editors, and “New Root” appearance.
And much more, you can see the complete list here.
Overall, we are satisfied with the results of concentrating on debugging, so we’ve decided to do it more often. Of our 3 releases per year, we will dedicate one to product stabilization and focus on feature development with the other two releases. This means you can still expect more features to be added in MPS 2020.1.
Keep using our Issue tracker to report problems and vote for the issues that are affecting you the most.
Have a nice day!
Your JetBrains MPS Team