Error when building Standalone IDE
I want to create Standalone IDE but I can't because I get a strange error.
I have followed instruction on the link (https://www.jetbrains.com/help/mps/building-standalone-ides-for-your-languages.html#buildinganexamplercpbuild ) on how to create Standalone IDE using wizard way. After following all steps I have successfully created new project (Project.build). But I alreday have an error as you can see on the image below.
I used sugested solution to reload modules from disk and it seems like it fixed this error.
But I am not quite sure if it really fixed it because I recevied new error after that. Can someone tell me if this is correct way to fix this kind of error?
So after "fixing" first error I wanted to rebuild my Project.build but I received new error as you can see on the image bellow.
I have no idea how to fix these error. Can someone please help me how to fix it? Maybe I did something wrong in the first steps?
Thanks for any help, I really appriciate it.
Please sign in to leave a comment.
Hi!
You fixed the first error. You just got a new one.
Are language `de.slisson.mps.tables` and `com.dslfoundry.plaintextgen` are really used in modules you are packing in the build project? Are there instances of concepts of these languages?
Thank you for fast reply.
Yes, both languages are used in my language. `de.slisson.mps.tables` is used for generating table inside editor of my language and `com.dslfoundry.plaintextgen` is used inside generator for generating SLQ code(output).
No, they are not instance of concept. These two languages mentioned before are improted in my language through import model functionality.
I also tried adding these two languages as a dependencies through Model Property inside Project.Build(my standalone IDE). That did not solve my problem.
I'm not that good in the build language, but as far as I remember your build script should depend on build scripts those pack `de.slisson.mps.tables` language and `com.dslfoundry.plaintextgen` language.
Okey, but I don't understand how do I do it? I'm pretty new to Jetbrains MPS. I tried adding `de.slisson.mps.tables` and `com.dslfoundry.plaintextgen` build script through Model properties dependecies. As you can see on the image bellow. But I can't find build script for any of these two languages. I just see Structure, Editor etc.
Both languages are not bundled with MPS so I don't know what are their build projects. Most probably dedicated build projects packs a number of modules and needed build model name differs from the language name.
I will try to find build models packing these langauges.
Oh, now I understand what's the problem. Thank you very much for explanation.
I really appreciate your help and I hope you will be able to find these build models :)
Do you remember how you got de.slisson.mps.tables` and `com.dslfoundry.plaintextgen` languages? You probably installed plugins or ran some gradle script?
Yes, I remember. I have added both languages('de.slisson.mps.tables' and 'com.dslfoundry.plaintextgen') with plugin functionality, as you can see on the images below. Also here are links to the both plugins de.slisson.mps.tables and com.dslfoundry.plaintextgen.
On your screenshots I saw you have a bunch of itemis plugins installed.
I found this plugin with build models for mps extenstions https://plugins.jetbrains.com/plugin/17136-de-itemis-mps-extensions-build. de.itemis.mps.extensions build project seems contains these 2 languages. This is a link to the build project root node http://127.0.0.1:63320/node?ref=r%3Afb24ac52-5985-4947-bba9-25be6fd32c1a%28de.itemis.mps.extensions.build%29%2F3410197114990977083
That's wonderful.
I have added mps extensions through plugin functionality. But I still receive same errors, am I doing something wrong? I have added 'de.items.mps.extensions.build' as a dependencie under model properties in my standalone IDE project as you can see on the image below.
You need to define dependencies between build scripts. Here is a related documentation topic https://www.jetbrains.com/help/mps/2022.3/building-standalone-ides-for-your-languages.html#dependencies
Thank you very much for help. I really appreciate it. I have managed to solve my errors :) Now I only get one warning: The plugin 'jetbrains.mps.build' was not found in the layout of `Project'. I fixed this warning with adding mpsBuild into my dependecies. Now my dependecises look like this:
Now I can rebuild my project successfully. But when I try to Run my project like this:
I get following error:
fetchDependencies:
java.compile.SQLLanguage:
[javac] Compiling 26 source files to (My path to project)\build\tmp\Project\java\out\SQLLanguage
BUILD FAILED
(My path to project)\build.xml:487: C:\Program Files\JetBrains\MPS 2021.2\de.itemis.mps.celllayout\languages\de.itemis.mps.celllayout does not exist.
Total time: 0 seconds
Process finished with exit code 1
Do you know how can I solve this problem?
Thank you in advance.
Probably the problem is in artefacts location in the build dependencies. The artefacts location should point to a location where artifacts of dedicated build script are placed. For mpsStandalone the artifact location is $mps_home, but plugins packed by de.itemis.mps.extensions build are placed not under $mps_home.
How do I know where my build script is placed? I have tryied to change de.itemis.mps.extensions from $mps_home to $mps_home/plugins but it didn't solve my problem. Do you have any tips?
I also looked into build.xml file, what is on line 487. Because error says it's problem in line 487. Is this maybe useful to you?
Hi Samsung831, I have created a small sample project using MPS-extensions that also contains both a Gradle and an MPS build script. It doesn't build the whole IDE, just the plugin, but the dependency mechanism works the same in this case so I hope it will help you.
Hello Sergej, thank you very much for this sample, I really appreciate it! :)
When I opened you sample I have following words marked red, but it does't show any error when I try to build model. Is this normal?
Also when I try to run your exameple I receive again same error:(.Did I forgot to do any steps?
Thank you so much for help in advance.
There are instructions in README.md, did you follow them?
ahhh, my mistake, I was sloppy :)
I followed your steps and now your sample works perfectly. Thank you very much for help.
Also I was able to rebuild and run my Standalone IDE project succesfully :). I have one last question. How can I run my Standalone IDE? I noticed there have been created some files under build/artifacts/Project(my standalone IDE) but I can't find exe file. Any help?
Thank you.
Also when I run ProjectDistribution I get following error:
Why "win" does not exist. Does anyone know how to solve this?
The usual pattern is to use the MPS generic distribution to build a generic distribution of your RCP and then build platform-specific distributions out of that. The generic distribution contains startup scripts and other helper binaries for multiple platforms under bin/win, bin/linux and bin/mac. Each platform-specific distribution keeps just the binaries for its platform and places them into bin/.
Thank you very much for the explanation :)
I managed to build ProjectDistribution successfully. Also I have copied "win" folder content inside my extracted zip ("build\artifacts\ProjectDistribution\Project-212.SNAPSHOT.win\bin"). But when I try to run mps.bat command to run my Standalone IDE in get following error:
I have added my JAVA_HOME as you can see below. I run command "echo %JAVA_HOME% in cmd:
What I am doing wrong?Can you please help me? :)
I was able to fix above error and now I am not sure if I should run mps.bat or project.bat?
When i run project.bat I receive following error:
And when I try to run mps.bat I receive following two errors:
Any idea on how to solve these problems? :)
Your JDK is probably too new. You need to use the JDK (aka JBR, JetBrains Runtime) that comes with MPS. https://github.com/JetBrains/JetBrainsRuntime.
Yes, you were right! :) Now I can run my Standalone ide.
When I create my model I receive following errors:
Also as you can see on the image above design is not correct. It should contains tables.
Any help with this? :)
Your RCP is probably missing the tables plugin (or its dependencies). Check Settings → Plugins.
Your suggestion solved my problems, thank you so much for help. Now I don't have any errors in my designer as you can see:
But when I try to rebuild my project I receive following error:
Any tips for this problem? :)
Okey, I found the solution for the last erorr. Problem was that I didn't have installed plugin 'com.dslfoundry.plaintextgen'. Now everything works as it should. Thank you very much for helping me, I really appreciate it. :)
Encounter an error while building a standalone Integrated Development Environment (IDE), potentially disrupting the development process. Troubleshoot by reviewing build configurations, dependencies, and error logs to identify the root cause of the issue. Document your troubleshooting steps and findings in branded notebooks, facilitating organized record-keeping and communication as you address and resolve errors encountered during the standalone IDE building process, ensuring smooth development workflows and reliable software products.