How to run the generator via command line?
Hello.
I'm new to MPS: just finished the 'calculator tutorial' and created a couple of simple languages for things I'm working with and I'm already full of enthusiasm:)
I'm interested if I can integrate some code generation within my build process. Is there any way to run the generator via command line?
Thanks,
Alexey
I'm new to MPS: just finished the 'calculator tutorial' and created a couple of simple languages for things I'm working with and I'm already full of enthusiasm:)
I'm interested if I can integrate some code generation within my build process. Is there any way to run the generator via command line?
Thanks,
Alexey
Please sign in to leave a comment.
--
Regards,
Julia
<project name="test" default="generate"> <property name="mps.home" value="C:/Program Files/JetBrains/MPS-7347"/> <taskdef resource="jetbrains/mps/build/ant/antlib.xml" classpath="${mps.home}/languages/generate.ant.task.jar"/> <target name="generate"> <mps.generate> <model file="D:/..../models/sandbox.mps"/> </mps.generate> </target> </project>My first attempt failed with message, that file <MPS home>/*platform*/generate.ant.task.jar does not exist or is not a directory or a jar file. It doesn't exist indeed, it's located in the 'language' folder (I'm using MPS 2.0 build 7347).
Then I've found that there was some bug, and downloaded the newer version of generate.ant.task.jar from here: http://confluence.jetbrains.net/download/attachments/39781994/generate.ant.task.jar (161653 bytes). Now generation seems to be started, but it failed with JavaHeapSpace. See the stack trace below..
Any suggestions? I can extract the minimal model, that can reproduce the error...
Thanks,
Alexey
Even setting fork=true alone could resolve the problem, since if no jvmargs is set, generation task is started with default arguments which look like "-Xss1024k -Xmx512m -XX:MaxPermSize=92m -XX:+HeapDumpOnOutOfMemoryError".
--
Regards,
Julia