After installing 2.0, users should perform the following steps to migrate their code to new format:
Warning!!! It is not possible to revert migrated models back to old format!
- To make virtual packages (folders) visible again
- Tools -> Scripts -> By Language -> jetbrains.mps.lang.core -> Restore Virtual Packages
- To correct language and aspect dependencies on devkits
- open /bin/mps.vmoptions (or mps.exe.vmoptions on Windows)
- add a line "-Dmps.internal=true" to the end of the file
- save file and start MPS.
- execute tools-> internal -> Add Language Design Devkit To All Languages
- execute tools-> internal -> Add General Purpose Devkit to Language Models
- execute tools-> internal -> Remove Language Design Devkit from Models
- execute tools-> internal -> Remove BootstrapLanguages Devkit from Language Models
- execute tools-> internal -> Add Necessary ModuleDeps Everywhere
- To convert TabbedEditors in plugin aspects
- Tools-> Scripts-> By Language -> jetbrains.mps.lang.pugin -> split tabbed editors
- regenerate changed plugin models
- To convert attributes to the new format (usually in generators, quotations and patterns)
- Tools -> Scripts -> By Language -> jetbrains.mps.lang.core -> Convert Attributes
- Re-generate languages, then solutions
- If you have your own attribute descriptions (
AnnotationLinkDeclaration
instances) it will require manual migration for each attribute:- Ensure attribute concept described in
AnnotationLinkDeclaration
(target
) is subconcept of one ofNodeAttribute
,LinkAttribute
orPropertyAttribute
depending on the attributestereotype
- Define
role
concept property in attribute concept as attributerole
inAnnotationLinkDeclaration
- If
sourceCardinality
was * definemultiple
concept property in attribute concept - Define
attributed
concept link fromsource
inAnnotationLinkDeclaration
- Perform actions from steps 1 and 2 for migrated attributes
- For simple attributes (when they are direct subconcepts of
BaseConcept
) migration script is available
- Ensure attribute concept described in
-----------------------------------
-----------------------------------
To migrate to the new trace information generation:
Scripts->By Language->jetbrains.mps.lang.plugin->Upgrade Trace Info Generation
-----------------------------------
To migrate to new stub refs
tools-> upgrade stubs-> update language accessories
save & restart
tools-> upgrade stubs-> re-resolve stub refs
save & restart
optimize imports
find all broken refs and fix them manually by adding necessary module deps
//--here we have correct refs. Restarts are not really necessary, but it's better to perform
regenerate all generators using quotations and node/xxx/ operation
regenerate all modules
-----------------------------------
Also migration script "remove wildcards from unbound params" should be applied.
-----------------------------------
to migrate to new intention instantiation - regenerate all intentions models
the same thing with find usages and refactorings aspects