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!

Automatic migration

Just execute Main Menu -> Tools -> Start Migration to MPS 2.0 and follow the instructions.

Non-automatic migration

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:

  1. Main Menu -> Tools -> Migrations 2.0 -> Upgrade Persistence
  2. Main Menu -> Tools -> Migrations 2.0 -> Fix Module Dependencies
  3. Main Menu -> Tools -> Migrations 2.0 -> Migrate Stub Models
  4. Open logical view, right-click project, select "Optimize Imports"
  5. Main Menu -> Tools -> Scripts -> All Scripts..., check all scripts with type "Migration (MPS 2.0)", click "Run Checked"
  6. Go to Main Menu -> File -> Settings. Select Model Checker properties and uncheck all checkboxes except "Check for unresolved references" and press "Ok". Right-click project node in logical view and select "Check Project". The Model Checker tool will show you all the broken references you have. Correct them by hand.
  7. Right-click project, select "Rebuild Project"
  8. (Recommended, but not necessary) Restart MPS.

What the migration will do with my code?

Upgrade Persistence
Fix Module Dependencies
Migrate Stub Models
Optimize Imports
Scripts
Model Checker and manual references resolution
Rebuild
  1. File -> Invalidate Caches and restart MPS
  2. To correct language and aspect dependencies on devkits
    1. execute tools-> internal -> Add Language Design Devkit To All Languages
    2. execute tools-> internal -> Add General Purpose Devkit to Language Models
    3. execute tools-> internal -> Remove Language Design Devkit from Models
    4. execute tools-> internal -> Remove BootstrapLanguages Devkit from Language Models
    5. execute tools-> internal -> Add Necessary ModuleDeps Everywhere
  3. To migrate to new stubs format (fix broken references to stub models)
    1. Tools-> Update Stub Refs-> Update Language Accessories Refs
    2. Tools-> Update Stub Refs-> Re-resolve Stub Refs
    3. right-click on your project -> optimize imports
    4. Most of the references will be fixed at the moment. But a small amount of them can be left unresolved (if threre were illegal model imports which MPS was not able to find in previous versions). So, find all broken references left and fix them manually by adding necessary module dependencies. You can use Model Checker tool to find all broken references (right-click on project -> check models)
  4. To convert attributes to the new format (usually in generators, quotations and patterns)
    1. Tools -> Scripts -> By Language -> jetbrains.mps.lang.core -> Convert Attributes
    2. Re-generate languages, then solutions
    3. If you have your own attribute descriptions (AnnotationLinkDeclaration instances) it will require manual migration for each attribute:
      1. Ensure attribute concept described in AnnotationLinkDeclaration (target) is subconcept of one of NodeAttribute, LinkAttribute or PropertyAttribute depending on the attribute stereotype
      2. Define role concept property in attribute concept as attribute role in AnnotationLinkDeclaration
      3. If sourceCardinality was * define multiple concept property in attribute concept
      4. Define attributed concept link from source in AnnotationLinkDeclaration
      5. Perform actions from steps 1 and 2 for migrated attributes
      6. For simple attributes (when they are direct subconcepts of BaseConcept) migration script is available
  5. To make virtual packages (folders) visible againĀ 
    1. Tools -> Scripts -> By Language -> jetbrains.mps.lang.core -> Restore Virtual Packages
  6. To convert TabbedEditors and icons in plugin aspects
    1. Tools-> Scripts-> By Language -> jetbrains.mps.lang.plugin -> split tabbed editors
    2. Tools-> Scripts-> By Language -> jetbrains.mps.lang.plugin -> Update Icons
  7. To migrate to the new trace information generation
    1. Tools -> Scripts->By Language->jetbrains.mps.lang.plugin->Upgrade Trace Info Generation
  8. Execute Tools->Scripts->By Language-> jetbrains.mps.baseLanguage.closures-> remove wildcards from unbound params
  9. Execute Tools->Scripts->By Language-> jetbrains.mps.baseLanguage.runConfigurations -> Fix References To Deleted Run Models
  10. Regenerate (!!! use "Rebuild" action, not "Make")
    1. all project languages
    2. all project solutions (!!! after languages)