Child pages
  • Migration20
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

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!

  1. To correct language and aspect dependencies on devkits
    1. open /bin/mps.vmoptions (or mps.exe.vmoptions on Windows)
    2. add a line "-Dmps.internal=true" to the end of the file
    3. save file and start MPS.
    4. execute tools-> internal -> Add Language Design Devkit To All Languages
    5. execute tools-> internal -> Add General Purpose Devkit to Language Models
    6. execute tools-> internal -> Remove Language Design Devkit from Models
    7. execute tools-> internal -> Remove BootstrapLanguages Devkit from Language Models
    8. execute tools-> internal -> Add Necessary ModuleDeps Everywhere
  2. To migrate to new stubs format (fix broken references to stub models)
    1. Tools-> Upgrade Stubs-> update language accessories
    2. Tools-> Upgrade Stubs-> 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)
    5. //here all references are resolved. The next two are necessary only if you used the quotations language. In this case, quotations should be regenerated
    6. regenerate all generators
    7. regenerate all modules
  3. 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
  4. To make virtual packages (folders) visible again 
    1. Tools -> Scripts -> By Language -> jetbrains.mps.lang.core -> Restore Virtual Packages
  5. To convert TabbedEditors in plugin aspects
    1. Tools-> Scripts-> By Language -> jetbrains.mps.lang.pugin -> split tabbed editors
    2. regenerate changed plugin models
  6. To migrate to the new trace information generation
    1. Tools -> Scripts->By Language->jetbrains.mps.lang.plugin->Upgrade Trace Info Generation
  7. Execute Tools->Scripts->By Language-> jetbrains.mps.baseLanguage.closures-> remove wildcards from unbound params
  8. To migrate to new aspects instantiation
    1. regenerate all intentions language aspects
    2. regenerate all findUsages language aspects
    3. regenerate all refactorings language aspects
  • No labels