After installing 2.0, the following should be done to migrate old code to new format:
Warning!!! It is not possible to revert migrated models back to old format!
Just execute Main Menu -> Tools -> Start Migration to MPS 2.0 and follow the instructions.
If you want full control on what MPS will do, you can use this way of performing migration. In the next part we'll consider all the refactorings separately.
Do the following:
AnnotationLinkDeclarationinstances) it will require manual migration for each attribute:
target) is subconcept of one of
PropertyAttributedepending on the attribute
roleconcept property in attribute concept as attribute
sourceCardinalitywas * define
multipleconcept property in attribute concept
attributedconcept link from
BaseConcept) migration script is available
Since MPS 1.5 we've changed the format in which models are stored on disk. Commonly this is a performance-related issue. This action will re-save all models and modules in your project in a new format.
In MPS 1.5 we had some unclear dependencies especially in languages and language models. This action will reconsider module imports and change their structure (some devkits will be replaced with others)
If you tried to use different versions of the same library in older versions of MPS, you may know that MPS didn't handle such situation. References to stub models didn't contain any information about a place from where this model is. Now it also contains the ID of the module containing a model, so that you can use different versions of the same code with the only restriction - they should not be added as stubs to the same module. So, we need to update all the references to stub models from your code. MPS does it the following way: firstly, it tries to resolve the model in scope of current module using the old "partial" id. If it succeeds, the reference is then resolved. If this fails, MPS tries to resolve it globally and if this succeeds, add a corresponding module import and resolve the reference. Also, this action will correct model imports correspondingly.
This will remove dependencies on modules that don't exist in MPS anymore (and really unused dependencies, too)
When we change language syntax, a common way of migrating the outdated code to the new syntax (where possible) is to provide a refactoring (we call this kind of refactorings "migration scripts" not to mix them with other types of refactorings) which will change old syntax to new one (if it's possible). This action will find all MigrationScript instances in MPS and execute those of them which have a "migration" type (there are also so-called "enhancement scripts", which will not be executed by this action).
If you have used some internal API, or somewhy MPS couldn't resolve a stub reference or any other reference, you can correct them manually. This tool will help to find all such references.
After you have migrated your code (MPS models) to match 2.0 version, they should be rebuilt and recompiled to start working in MPS. That's what this step does.