MPS can now handle different versions of one .jar file attached as "stub models" to different modules. If the jars have models with same name inside of them, those models will be visible as separate entities, and can be imported separately. So, you can use multiple versions of a library in your project in M4.
After upgrading to MPS 2.0 you'll see many broken references. Please find how to fix it here Migration to 2.0
First version of MPS-specific contextual help was published on: www.jetbrains.com/mps/webhelp. You can press F1 at any time in MPS to navigate to associated help topic. We are going to improve this help and finally provide our users with cotext-specific assistance in all MPS dialogs in upcoming release.
Merge dialog was rewritten almost from scratch. Now it has new, more transparent and easy behavior. New merge dialog is so far experimental and have several issue (for instance, no model imports merging), so if you want to temporary switch it off, add -Dmps.newmerge=false line in bin/mps.vmoptions.
When MPS model files become corrupted because of merge conflicts, you get dialog with list of files (including models) which need merging. This dialog was not changed at all, everything is left as it was.
On clicking "Merge Files" button on .mps model file light and easy dialog, "Merge Model" appears. There you can see model tree with roots which are modified in at least one of model versions. Roots are colored if they have changes which are not applied yet:
- Green — root is added in one of the model versions
- Gray — root is deleted in one of the model versions
- Blue — root contains non-conflicting changes (in one or two of versions)
- Red — root contains conflicting changes
Merge roots dialog is invoked on double clicking root in tree. There you can see three editors. By default, all changes are not applied. To apply all non-conflicting changes in root, you can click corresponding button on toolbar. Conflicting changes can be applied only manually. When you apply change, all other changes which are conflicting, automatically become excluded. When you exclude change, all conflicting become automatically applied. On clicking "Apply" dialog button result of merging root becomes saved, on clicking "Cancel" — descarded.
The language jetbrains.mps.platform.conf can be used to define configurations (such as plugin.xml), as well as present existing configuration files as stub models.
MPS has switched to stable Idea platform version 103.72.
Type system trace is a new tool which provides information about type checking.
It can be used to better understand why a type error occurred.
The tool window is divided into two parts. In the left part the trace is shown.
Type system engine applies type system rules to the program consequently and the effect of this is shown in the trace.
The trace is a tree of elementary operations such as
- type assigned
- equation added
- subtyping added
- subtyping solved or checked
- error added
- when concrete block added
Also there are some operations which don't have effect on nodes' types. They are shown for better understanding of type checking process.
The other part of this tool shows type system state - the result of applying all operations up to the selected one.
So the trace and state together can be used as "type system debugger".
This example shows typical usage of typesystem trace. Here we can see a simple type error - an integer constant put into a list of strings.
You can select "Trace for selected node" if you want to see only information about specific node (it should be selected before opening the trace).
Trace supports navigation to typesystem rules and nodes they were applied to.
New features in tuples language
- Named tuple can implement any interface
Bugfixes in tuples language
- MPS-11134 Equality comparison for primitive tuple elements is generated to erroneous object comparison
- MPS-11446 Can't return [null, null] tuple from method (uncompilable generated code)
- MPS-7653 Problem with Tuples constructor called with null arguments
Bugfixes in collections language
- MPS-11507 Method Sequence.fromArray is not NPE safe