Embeddr plugin distribution

46 views
Skip to first unread message

Vitaly Osipov

unread,
Jun 13, 2018, 8:17:52 AM6/13/18
to mbeddr-discuss
Hello All, 

I am new to MPS and Embeddr, therefore I might be doing something wrong. 
I would like to install embeddr as plugin distribution to use parts of it for my own languages. For that I downloaded MPS 2017.2.2 for linux and installed it, com.mbeddr.allInOne_2017_2_0.zip and extracted it to the plugins folder. Now when I start MPS, go to Modules Pool, I do see the plugins in the com.mbeddr folder. If I then do right mouse click and choose check selected models on the com.mbeddr folder I get around 583 Errors. What do I do wrong? 

I also tried a newer MPS and the nightly builds, but still having the same issues. Could someone help me to get started? 

Vitaly

Sergej Koščejev

unread,
Jun 14, 2018, 7:04:35 AM6/14/18
to mbeddr-...@googlegroups.com
Hi Vitaly,

what errors are you getting from the model checker?

Sergej

--
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-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vitaly Osipov

unread,
Jun 14, 2018, 8:22:39 AM6/14/18
to mbeddr-discuss
Hello Sergej, 

They are too many to list them. As a proof of concept, I have also tried to run 'check selected models'  on the jetbrains folder, I also get thousands of errors. The consequence from this finding is that either one can ignore what the model checker says, since it does not even work for the internal language, or I use it in a wrong way. 
I also tried to download and compile the com.mbeddr.tutorial_2017_2_0 in MPS 2017.2.2 using plugns com.mbeddr.allInOne_2017_2_0.zip. It gave me 6 errors only, which I could fix myself (though I still don't quite understand why it should not compile out of the box) 

I also tried to use later nightly release in the latest release of MPS => no success, since some of the mbeddr plugins were not ported to the newer version. 

Since I have already developed a language in the latest release of MPS I decided to build mbeddr from sources to try to use the latest mbeddr in my project. 
To save time, I decided to use docker image mbeddr.build.docker
So I pulled the image, within the container pulled the mbeddr.build.docker image, in the container cloned the master and ran ./gradlew in the container => failed on around 66% 
It seems to be that mbeddr uses CI with this container, so it has to work, but could someone tell me how to build from sources within the container? ./gradlew in the cloned directory obviously did not work.

Vitaly
To unsubscribe from this group and stop receiving emails from it, send an email to mbeddr-discus...@googlegroups.com.

Sergej Koščejev

unread,
Jun 14, 2018, 8:43:16 AM6/14/18
to mbeddr-...@googlegroups.com
On Thu, Jun 14, 2018 at 2:22 PM, Vitaly Osipov <deve...@osipov.mobi> wrote:
Hello Sergej, 

They are too many to list them. As a proof of concept, I have also tried to run 'check selected models'  on the jetbrains folder, I also get thousands of errors. The consequence from this finding is that either one can ignore what the model checker says, since it does not even work for the internal language, or I use it in a wrong way. 

Probably, but it depends on the errors. If the errors are about missing dependencies or unresolved references, it probably means something is wrong with the installation. But for example errors in test cases can probably be ignored.
 
I also tried to download and compile the com.mbeddr.tutorial_2017_2_0 in MPS 2017.2.2 using plugns com.mbeddr.allInOne_2017_2_0.zip. It gave me 6 errors only, which I could fix myself (though I still don't quite understand why it should not compile out of the box)

The model checker quite often shows errors that don't really matter during the build but are hard to eliminate, so people probably just disable "Check Models Before Generation" very soon after installing MPS. I certainly do.
 
Since I have already developed a language in the latest release of MPS I decided to build mbeddr from sources to try to use the latest mbeddr in my project. 
To save time, I decided to use docker image mbeddr.build.docker
So I pulled the image, within the container pulled the mbeddr.build.docker image, in the container cloned the master and ran ./gradlew in the container => failed on around 66% 
It seems to be that mbeddr uses CI with this container, so it has to work, but could someone tell me how to build from sources within the container? ./gradlew in the cloned directory obviously did not work.

It's hard to help without seeing the specific error messages.

mbeddr doesn't exactly undergo rigorous testing by a dedicated QA team before each release so expect some rough edges.

Sergej

Vitaly Osipov

unread,
Jun 14, 2018, 9:01:45 AM6/14/18
to mbeddr-discuss
Ok thank you for the tip to disable the Model Checker, did not know that I can proceed forward without having resolved the Model Checker errors first. 

I guess the errors in Docker are quite easy to reproduce: pull the latest image, clone the repository, run ./gradlew in the cloned folder. 
The best would be if someone from mbeddr team would give the script they run in the container to build mbeddr 

It seems to me that the build fails when it tries to build the languages in mps: here is copy-paste from the container:

 [generate] Generation failed for model 'com.mbeddr.mpsutil.projectview.views.plugin', unexpected error in generator query: source nodes query failed
 [generate] -- -- was input node: [actualArgument] CommandClosureLiteral null[4182963252784423527] in com.mbeddr.mpsutil.multilingual.settings.runtime.plugin@0
 [generate] java.lang.NullPointerException
 [generate]     at jetbrains.mps.baseLanguage.closures.generator.baseLanguage.template.main.QueriesGenerated.sourceNodesQuery_349397194808798166(QueriesGenerated.java:2163)
 [generate]     at jetbrains.mps.baseLanguage.closures.generator.baseLanguage.template.main.QueriesGenerated$SNsQ.evaluate(QueriesGenerated.java:4136)
 [generate]     at jetbrains.mps.generator.template.DefaultQueryExecutionContext.evaluate(DefaultQueryExecutionContext.java:186)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor$MacroWithInput.getNewInputNodes(TemplateProcessor.java:305)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor$CopySrcMacros.apply(TemplateProcessor.java:410)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor.applyMacro(TemplateProcessor.java:110)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor.applyTemplate(TemplateProcessor.java:135)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor.applyTemplate(TemplateProcessor.java:137)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor.applyTemplate(TemplateProcessor.java:137)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor$MacroImpl.nextMacro(TemplateProcessor.java:260)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor$VarMacro.apply(TemplateProcessor.java:547)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor.applyMacro(TemplateProcessor.java:110)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor.applyTemplate(TemplateProcessor.java:135)
 [generate]     at jetbrains.mps.generator.impl.TemplateProcessor.apply(TemplateProcessor.java:102)
 [generate]     at jetbrains.mps.generator.impl.TemplateContainer.processRuleConsequence(TemplateContainer.java:80)
 [generate]     at jetbrains.mps.generator.impl.RuleConsequenceProcessor$TemplateDeclarationReference.processRuleConsequence(RuleConsequenceProcessor.java:200)
 [generate]     at jetbrains.mps.generator.impl.RuleConsequenceProcessor$InlineSwitch.processRuleConsequence(RuleConsequenceProcessor.java:74)
 [generate]     at jetbrains.mps.generator.impl.interpreted.TemplateReductionRuleInterpreted.apply(TemplateReductionRuleInterpreted.java:74)
 [generate]     at jetbrains.mps.generator.template.DefaultQueryExecutionContext.applyRule(DefaultQueryExecutionContext.java:227)
 [generate]     at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.tryToReduce(TemplateExecutionEnvironmentImpl.java:299)
 [generate]     at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.tryToReduce(TemplateExecutionEnvironmentImpl.java:253)
 [generate]     at jetbrains.mps.generator.impl.TemplateGenerator$PartialCopyFacility.visitInputNode(TemplateGenerator.java:986)
 [generate]     at jetbrains.mps.generator.impl.TemplateGenerator$PartialCopyFacility.visitInputNode(TemplateGenerator.java:995)
 [generate]     at jetbrains.mps.generator.impl.TemplateGenerator$PartialCopyFacility.visitInputNode(TemplateGenerator.java:995)
 [generate]     at jetbrains.mps.generator.impl.TemplateGenerator$PartialCopyFacility.visitInputNode(TemplateGenerator.java:995)
 [generate]     at jetbrains.mps.generator.impl.TemplateGenerator$PartialCopyFacility.visitInputNode(TemplateGenerator.java:995)
 [generate]     at jetbrains.mps.generator.impl.TemplateGenerator$PartialCopyFacility.visitInputNode(TemplateGenerator.java:995)
 [generate]     at jetbrains.mps.generator.impl.TemplateGenerator$PartialCopyFacility.copyRootInputNode(TemplateGenerator.java:957)
 [generate]     at jetbrains.mps.generator.impl.TemplateGenerator.copyRootInputNode(TemplateGenerator.java:439)
 [generate]     at jetbrains.mps.generator.impl.ParallelTemplateGenerator.access$201(ParallelTemplateGenerator.java:46)
 [generate]     at jetbrains.mps.generator.impl.ParallelTemplateGenerator$3.run(ParallelTemplateGenerator.java:101)
 [generate]     at jetbrains.mps.generator.impl.ParallelTemplateGenerator$CompositeGenerationTask.run(ParallelTemplateGenerator.java:220)
 [generate]     at jetbrains.mps.generator.impl.GenerationTaskAdapter.run(GenerationTaskAdapter.java:42)
 [generate]     at jetbrains.mps.generator.impl.GenerationTaskPool$ModelReadFlagLegacyAccess.execute(GenerationTaskPool.java:135)
 [generate]     at jetbrains.mps.generator.impl.GenerationTaskPool$ModelReadAdapter.run(GenerationTaskPool.java:156)
 [generate]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 [generate]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 [generate]     at java.lang.Thread.run(Thread.java:748)
 [generate]
 [generate] Generation failed for model 'com.mbeddr.mpsutil.smodule.runtime.lib', unexpected error in generator query: source nodes query failed
 [generate] -- -- was input node: [actualArgument] CommandClosureLiteral null[4182963252784423527] in com.mbeddr.mpsutil.multilingual.settings.runtime.plugin@0
 [generate] generation completed with errors in 3678 ms
 [generate] Error executing target jetbrains.mps.lang.core.Generate.generate
 [generate] Build failed. See previous messages for details.
 [generate] Make was not successful
 [generate] Compilation problems
 [generate] com/mbeddr/mpsutil/javainterpreter/plugin/JavaInterpreterHelper.java : The import com.mbeddr.mpsutil.interpreter cannot be resolved (line: 5)
 [generate] com/mbeddr/mpsutil/javainterpreter/plugin/JavaInterpreterHelper.java : IEnvironment cannot be resolved to a type (line: 13)
 [generate] Compilation problems
 [generate] com/mbeddr/mpsutil/javainterpreter/plugin/DebugHelper.java : The import com.mbeddr.mpsutil.interpreter cannot be resolved (line: 5)
 [generate] com/mbeddr/mpsutil/javainterpreter/plugin/DebugHelper.java : The import com.mbeddr.mpsutil.interpreter cannot be resolved (line: 6)
 [generate] com/mbeddr/mpsutil/javainterpreter/plugin/DebugHelper.java : IContext cannot be resolved to a type (line: 9)
 [generate] com/mbeddr/mpsutil/javainterpreter/plugin/DebugHelper.java : IEnvironment cannot be resolved to a type (line: 13)
 [generate] Compilation finished: 6 errors, 0 warnings.
 [generate] Error executing target jetbrains.mps.make.facets.JavaCompile.compile
 [generate] Build failed. See previous messages for details.
 [generate] Make was not successful
 [generate] ****************************************************************************************************
 [generate]     at jetbrains.mps.tool.builder.MpsWorker.failBuild(MpsWorker.java:199)
 [generate]     at jetbrains.mps.tool.builder.make.BaseGeneratorWorker.showStatistic(BaseGeneratorWorker.java:60)
 [generate]     at jetbrains.mps.tool.builder.make.GeneratorWorker.work(GeneratorWorker.java:69)
 [generate]     at jetbrains.mps.tool.builder.MpsWorker.workFromMain(MpsWorker.java:137)
 [generate]     at jetbrains.mps.tool.builder.make.GeneratorWorker.main(GeneratorWorker.java:81)
 [generate]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 [generate]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 [generate]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [generate]     at java.lang.reflect.Method.invoke(Method.java:498)
 [generate]     at jetbrains.mps.tool.builder.AntBootstrap.main(AntBootstrap.java:29)
 [generate]

BUILD FAILED
/root/mbeddr.core/scripts/com.mbeddr.platform/build.xml:11270: Process exited with code 1.
        at jetbrains.mps.build.ant.MpsLoadTask.processNonZeroExitCode(MpsLoadTask.java:235)
        at jetbrains.mps.build.ant.MpsLoadTask.execute(MpsLoadTask.java:163)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
        at org.apache.tools.ant.Main.runBuild(Main.java:857)
        at org.apache.tools.ant.Main.startAnt(Main.java:236)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:113)

Total time: 2 minutes 4 seconds


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':build:com.mbeddr:platform:build_platform'.
> Process 'command '/usr/lib/jvm/java-8-openjdk-amd64/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7m 22s
5 actionable tasks: 5 executed


Vitaly

Sergej Koščejev

unread,
Jun 14, 2018, 10:13:45 AM6/14/18
to mbeddr-...@googlegroups.com
The build command is just

./gradlew publishMbeddrPlatformPublicationToMavenRepository

and

./gradlew publishMbeddrPublicationToMavenRepository

so it's not that different from ./gradlew. If you run those commands expect them to break at the point where Gradle tries to upload artifacts to itemis' Nexus.

I don't really know why the error that you posted appears and I don't have time right now to investigate but maybe other list members would know.

mbeddr is being continuously built on build.mbeddr.com, you can log in there as guest and browse the builds (and see in the build logs the commands that are executed). The master branch is on MPS 2018.1, the branch for MPS 2017.2 is maintenance/mps20172 but it hasn't been built recently. The master branch is all green though.

Sergej


--
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-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages