Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to MPS 2021.1 #9

Open
eugenschindler opened this issue Feb 5, 2024 · 9 comments
Open

Migrate to MPS 2021.1 #9

eugenschindler opened this issue Feb 5, 2024 · 9 comments

Comments

@eugenschindler
Copy link
Member

mps-dflat is on quite an old version of MPS. The first step is to get it from MPS 2020.3 to MPS 2021.1

@eugenschindler
Copy link
Member Author

@alexanderpann I am trying to migrate and the intermediate results are in https://github.com/DSLFoundry/mps-dflat/tree/migrate/2021.1, but building after migration fails already in the com.dslfoundry.dflat.structure language with the following error on mps-richtext:
image
If I look at the editor of one of the first nodes that goes wrong (Aclass), then I indeed see that it has several IWords, while mps-richtext has this rule of "Cell has multiple children, but only one is expected" as a check during generation. Do you know if there was an API change to mps-richtext in MPS 2021.1?

@alexanderpann
Copy link

alexanderpann commented Feb 5, 2024

This commit contained the change: GrammarCells: Side transformation for optional cell inside an editor component was not available
The code you had should have never worked and I am surprised that we even have this check. The cardinality of childCellModel is one. Maybe in the past, it was not set at all but how is a custom factory cell supposed to work for multiple cells? Can't you just wrap your IWords inside a collection so you have only one editor cell?

@enikao
Copy link
Member

enikao commented Feb 8, 2024

I think the problem are editor components that contain grammarcells without a surrounding collection, like below.
Try to wrap all of these in a collection.
image

@enikao
Copy link
Member

enikao commented Feb 11, 2024

This branch fixes the editor issue by deleting the problematic optional cell postprocessing: https://github.com/DSLFoundry/mps-dflat/tree/niko/reduce-cyclic-dependencies

@enikao
Copy link
Member

enikao commented Feb 11, 2024

@alexanderpann Branch https://github.com/DSLFoundry/mps-dflat/tree/niko/optional-issue-editorContext-demo contains a minimal example language optional.issue with the problem (you can ignore all the other modules in the repo).

As soon as we use editorContext inside optional cell postprocess, the code becomes uncompileable (as the parameter is not available):

image

@alexanderpann
Copy link

We'll probably have to check all parameters in all grammar cell custom methods for that issue. This is not the first time that we are having this kind of issue. I'll maybe take a look at it in the evening.

@alexanderpann
Copy link

@enikao I checked your branch against the latest version of MPS-Extensions in the maintenance 2021.1 branch (opened as second project) and it compiles. I remembered that I fixed this issue in this commit: JetBrains/MPS-extensions@af9bdb2

Do you somehow get an old version of MPS-Extensions in your build? I can still see a reference to the old nexus in the build script instead of the new one: https://artifacts.itemis.cloud

@enikao
Copy link
Member

enikao commented Feb 11, 2024

@jconquet Could you check on the dependencies?

@jconquet
Copy link

I checked and there was indeed an old version of MPS-extention in the build referencing the old nexus. I changed this to reference the new one and it builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants