Is mbeddr compatible with MPS 3.4 EAP?

37 views
Skip to first unread message

Vladimir Sitnikov

unread,
Sep 13, 2016, 8:39:30 AM9/13/16
to mbeddr-discuss
I'm using "build from source mbeddr", and I wonder if I could switch to MPS 3.4.
Will it blend?

Vladimir

Kolja Dummann

unread,
Sep 13, 2016, 9:29:27 AM9/13/16
to Vladimir Sitnikov, mbeddr-...@googlegroups.com
Hi,

There is a branch “refactor/mps34” which will work with 3.4 but it sometimes uses features which haven’t been included into the official EAPs yet. Use it on your own risk.

Cheers,
Kolja

Cheers,
Kolja

-- 
Kolja Dummann
Rüderner Straße 2

70329 Stuttgart
M: 0176 840 39 172
Skype: kolja_dummann
 
--
You received this message because you are subscribed to the Google Groups "mbeddr-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mbeddr-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
signature.asc

Vladimir Sitnikov

unread,
Sep 18, 2016, 6:43:12 PM9/18/16
to mbeddr-discuss, sitnikov...@gmail.com
I did try upgrading to MPS 3.4 EAP (#MPS-162.1680) + mbeddr 06627e5df301 (refactor/mps34)

I've two issues with it:
1) Messages window prints nothing when I run "preview generated text". I used to use random "info ..." messages to debug my generation (e.g. scripts that transform nodes and print log messages).
Currently the messages window is empty. Well, if generation fails, then there's some exception, so the tool is somehow working, however I cannot use "info/debug/error" to print there.

2) It is not clear what is the replacement for GeneratedNodeSubstituteActions & co. It looks like the actions were deprecated, however it is not clear how to make grammar cells work again. Can you give a hint?

Vladimir

Sascha Lißon

unread,
Sep 19, 2016, 4:09:26 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
The deprecated concepts in the actions aspect are not required anymore. You can delete them.

Vladimir Sitnikov

unread,
Sep 19, 2016, 6:16:49 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
>The deprecated concepts in the actions aspect are not required anymore. You can delete them.

Does that mean "grammar cells" should work just by using them in the editor aspect?

It looks like they do not work for me: for instance, when I type 2+, the plus forms an "invalid IntegerLiteral".
The same thing when I type + or space after a variable, it is just appended to the variable name (I do have {name} constraint inherited via concept interface).

In the same way, grammar.optional no longer works.

Sascha Lißon

unread,
Sep 19, 2016, 6:25:51 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
In MPS 3.4, they moved the actions to the editor aspect. That's why we don't need the nodes in the actions aspect anymore, but can directly generate the actions in the editor aspect.
For this to work, you have execute the MPS 3.4 migrations on your language. For languages that are not migrated, MPS still uses the actions aspect and ignores the actions in the editor aspect. After the migration it's the other way around.

Vladimir Sitnikov

unread,
Sep 19, 2016, 6:32:06 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
> For this to work, you have execute the MPS 3.4 migrations on your language.

I did run migrations, and "generatedactions" were marked with @MigrateManually.
The migration was fine (no errors), except those @MigrateManually.

Well, I've already deleted those "generatedactions", and I see no errors, however grammar cells do not work or some other piece is missing.

Sascha Lißon

unread,
Sep 19, 2016, 6:35:45 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
Have you tried "Invalidate Caches"?

Vladimir Sitnikov

unread,
Sep 19, 2016, 6:55:47 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
Well, I did try:
1) Delete MPS folder (/Applications/MPS 3.3.app, /Applications/MPS 3.4.app) and use different MPS builds. Now I'm settled on MPS-162.1680-macos-jdk-bundled.dmg ( https://teamcity.jetbrains.com/viewLog.html?buildId=866727&tab=artifacts&buildTypeId=MPS_34_Distribution_DownloadableArtifacts )
2) Delete ~/.MPS3* (well, it seems to contain just a single ~/.MPS33/restart file)
3) Delete ~/Library/Caches/MPS3*
4) Rebuild mbeddr.core (~18 minutes, no errors)
5) Remove and readd sl-all and mbeddr.core global libraries
6) "Invalidate caches" and rebuild my language using grammar cells

Sascha Lißon

unread,
Sep 19, 2016, 7:04:48 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
Can you please verify that there is a class "GrammarActionsDescriptor" generated for your editor model?

Vladimir Sitnikov

unread,
Sep 19, 2016, 7:21:11 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
>Can you please verify that there is a class "GrammarActionsDescriptor" generated for your editor model?

It looks like it is.
public class GrammarActionsDescriptor extends AbstractGrammarActionDescriptor implements IGrammarActionsDescriptor {
...
5000 lines
...
}

Vladimir Sitnikov

unread,
Sep 19, 2016, 7:30:19 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
I just checked my "actions" aspect, and it contains several old-style actions marked with "@Migrated to ...".

Should I delete the old actions as well?

Here's sample action: 

Sascha Lißon

unread,
Sep 19, 2016, 7:38:13 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
No, they are just ignored after the migration.

There is one more check you can do to make sure, the actions from the editor aspect are used.
Execute this in the console: OldNewSubstituteUtil.getUsedLangVersion(module/your.language/, language/jetbrains.mps.lang.actions/)
It should return a value > 0.

Vladimir Sitnikov

unread,
Sep 19, 2016, 8:07:20 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
> Execute this in the console: OldNewSubstituteUtil.getUsedLangVersion(module/your.language/, language/jetbrains.mps.lang.actions/)

The result value is 3

Sascha Lißon

unread,
Sep 19, 2016, 8:09:19 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
Then I'm out of ideas. Is your language available somewhere?

Vladimir Sitnikov

unread,
Sep 19, 2016, 8:43:08 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
>Then I'm out of ideas. Is your language available somewhere?

Thanks. At least I know it should work "on its own".

Here's the link: https://github.com/vlsi/ide61131
I've committed what I have so far after running MPS 3.4 migrations & removing generated actions to https://github.com/vlsi/ide61131/tree/mps34 branch

I might try removing all the actions to see if there's some weird action/transformation that prevents grammarcells and other transformations from being executed.

Some of the transformations that were written like regular side transformations work. Some do not. That is strange for me.

Vladimir Sitnikov

unread,
Sep 19, 2016, 8:49:54 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
The language in question is com.github.vlsi.iec61131.types.
The sample node in question is com.github.vlsi.iec61131.types.structure.VariableDeclaration

The editor is flag{retain} flag{input} flag{output} {name} : %typeDecl% optional[- := %initializer% -] ; ?[- #Comment# -]

Sascha Lißon

unread,
Sep 19, 2016, 9:48:40 AM9/19/16
to mbeddr-discuss, sitnikov...@gmail.com
I found out, that MPS still uses the actions aspect, when it contains node factories. After deleting them, it works.
Reply all
Reply to author
Forward
0 new messages