mps grammar cells giving message "Error Missing Dependency on jetbrains.mps.lang.core"

256 views Asked by At

I am following along Kolja Dummann's Heavy Meta (4) livestream on Youtube.

I am trying to use the grammar cells to wrap a binary expression. the projection looks like this

<default> editor for concept BinaryExpression                                                                                                          
  node cell layout:                                                                                                                                    
    projection: [> wrap % left % grammar.constant wrap % right % <]                                                                                    
    grammar: rule: <derive from projection>    (instance of CellModel_RefNode)  (instance of GrammarConstantQueryCell)  (instance of CellModel_RefNode)
                                                                                                                                                       
  inspected cell layout:                                                                                                                               
    <choose cell model>                                                                                                                                
                                                                                                                                                       

the grammar.constant constant text property is set to subconcept.conceptAlias.

Unfortunately, I am getting an error message in the editor for both the wrap cells that says:

Error Missing Dependency on jetbrains.mps.lang.core

When I rebuild the editor, the language or the project, it reports that the rebuild is successful, however, I am unable to get the expected behavior of the aliases (+,-,*,/) being recognized after I type a number in the sandbox project.

I have added the jetbrains.mps.lang.core to the editor, but it shows up greyed out, i.e. unused.

when earlier in the tutorial I used wrap on my number literal editor, the expected behavior happened even though I got the editor showed this same error message. so perhaps the error message is a red herring.

I am using

  • MPS 2020.2 (202.6397.948). (I had same issue in 2020.1)
  • the grammarcells from de.itemis.mps.extensions-2020.1.1477.e4af43c (I think - not sure how to check).
2

There are 2 answers

0
Thomson On

You have to use JetBrains MPS 2021.2.1 - It works correctly.

I used grammar.wrap in 2032.3 - it didn't work correctly. You can build the language but changes are not applied to the model - there are still some troubles to use grammarcell language in the newest MPS version 2021.3.

0
user2595776 On

There is a quick fix action, "Add dummy component to fix dependency on jetbrains.mps.lang.core". You can execute it to fix the error.