You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
create model: report the devkits and used languages that MPS adds to a new model #232
With #230, mops create model and Code Mode SModule.createModel run MPS's ModelsAutoImportsManager.performImports before the first save. So a new model gets the devkits and used languages that MPS gives it. For example, a <language>.structure model gets jetbrains.mps.devkit.aspect.structure, and a <language>.editor model gets jetbrains.mps.devkit.general-purpose plus jetbrains.mps.lang.editor and jetbrains.mps.lang.actions.
mops fills these in for the caller, but the output does not show them. Neither the report nor the --dry-run plan lists them. This goes against VISION principle 3, "Make every implicit choice visible".
Current output (cli/src/main/kotlin/com/specificlanguages/mops/cli/create/CreateModelCommand.kt on the #230 branch):
created model repro.lang.structure [r:…] in module repro.lang [l:…]
persistence: …
location: …
What to build
The create model report lists the devkits and used languages that the new model got, in the human output and in --json (ModelCreationReport).
The --dry-run plan lists the devkits and used languages the model would get (ModelCreationPlan), if MPS can compute this without creating the model. If it cannot, the plan says that imports are added on creation.
Code Mode createModel returns a normal SModel, so the caller can read its imports. Name this sibling path in the PR.
Explicitly not doing
Changing which devkits and languages a model gets. MPS decides that.
LanguageAspect.<ASPECT>.createNew, which is MPS's own API.
Acceptance criteria
mops create model <language>.structure --module <language> prints the added devkit and used languages.
--json output has them as fields.
--dry-run shows them, or says that they are added on creation.
Generated reference docs and examples are updated.
Activity