JetBrains / MPS-extensions

MPS-extensions aims to ease language development within MPS.
https://jetbrains.github.io/MPS-extensions/
Apache License 2.0
82 stars 50 forks source link

GrammarCells: broken reference 'conceptDeclaration' in [actualArgument] ConceptIdRefExpression #737

Open mutex1980 opened 8 months ago

mutex1980 commented 8 months ago

In a vanilla build (with build languageant generate) following exactly the reference structure for binary expression (left out the substitute cell for minimality):

image

leads to error:

mps  |  [mps.make] broken reference 'conceptDeclaration' in [actualArgument] ConceptIdRefExpression null[1787432944212145825] in math.editor@4_3 (target model is null)

mps  |  [mps.make] -- -- was input node: [actualArgument] ConceptIdRefExpression null[1787432944212145825] in math.editor@4_3

mps  |  [mps.make] broken reference 'conceptDeclaration' in [actualArgument] ConceptIdRefExpression null[1787432944212146872] in math.editor@4_3 (target model is null)

mps  |  [mps.make] -- -- was input node: [actualArgument] ConceptIdRefExpression null[1787432944212146872] in math.editor@4_3

mps  |  [mps.make] model 'math.editor@3_1' has been generated with errors

Within MPS I can randomly successfully rebuild the whole project (especially if I rebuild the BinaryExpression editor component step-by-step in the UI from scratch and perform rebuilds after each step), but if I restart MPS then with cleaned caches and delete all source_gen, classes_gen and source_gen.caches project wide, I can reproduce the vanilla ant build problem also within the IDE:

image

The complaining transformation step seems to have problems with the wrap cells in a transient model:

image

And the IDE error message log double clicked points to this location in the generated SideTransformation Menu (see cursor position):

image

Hovering this position says:

Unresolved reference: BaseConcept

Any attempts to include mps.lang.core (where BaseConcept is defined) to any language dependencies didn't help. Is this a bug or did I do something wrong?

MPS: 2023.2, Build #MPS-232.10072.781 MPS-Extensions: 2023.2.2697.35c375c

Workaround:

alexanderpann commented 8 months ago

I can have a look at it if you have a sample project but at the time you created the ticket the version for 2023.2 was not even released so you might have mixed MPS versions by accident.

mutex1980 commented 8 months ago

I can have a look at it if you have a sample project but at the time you created the ticket the version for 2023.2 was not even released so you might have mixed MPS versions by accident.

Hi Alexander, what do you mean by mixed versions by accident? I verified the usage of these versions:

MPS: 2023.2, Build #MPS-232.10072.781 MPS-Extensions: 2023.2.2697.35c375c

I fetched the MPS Extensions for 2032.2 here:

https://mvnrepository.com/artifact/de.itemis.mps/extensions

alexanderpann commented 8 months ago

Regarding the version that you are using: It seems like we published some pre-releases by accident. The newest official release is 2023.2.2728.44d39ee. I have not seen any similar issues while migrating our other MPS platforms, that's why I suspect there is something wrong with your setup. If you have a sample project, I could test it but the Grammar Cells sandbox also works in this repository.