[SOLVED] BuildMps_Language part in an Ant build file: Failed to convert path
Problem
When I add a language (BuildMps_Language) in the project structure of an Ant build file (j.m.build.structure.BuildProject) I cannot compile the model in which the build file is in.
Error message:
Failed to convert path D:/Skola/Ing/DP/projects/AntBuilder/languages/MyLanguage/models
-- -- was input node: [parts] BuildMps_Language "MyLanguage"[292039609691017940] in MySolution.myModel@0
-- was template node: r:54537613-52b5-40a8-b223-e87f0960b04f(jetbrains.mps.build.mps.generator.template.main@generator)/3189788309732145594
Failed to convert path D:/Skola/Ing/DP/projects/AntBuilder/languages/MyLanguage//source_gen
-- -- was input node: [parts] BuildMps_Language "MyLanguage"[292039609691017940] in MySolution.myModel@0
-- was template node: r:54537613-52b5-40a8-b223-e87f0960b04f(jetbrains.mps.build.mps.generator.template.main@generator)/3189788309732145594
Failed to convert path D:/Skola/Ing/DP/projects/AntBuilder/languages/MyLanguage/generator/templates
-- -- was input node: [generator] BuildMps_Generator "MyLanguage#01"[292039609691017988] in MySolution.myModel@0
-- was template node: r:54537613-52b5-40a8-b223-e87f0960b04f(jetbrains.mps.build.mps.generator.template.main@generator)/3189788309732145594
Failed to convert path D:/Skola/Ing/DP/projects/AntBuilder/languages/MyLanguage//generator/source_gen
-- -- was input node: [generator] BuildMps_Generator "MyLanguage#01"[292039609691017988] in MySolution.myModel@0
-- was template node: r:54537613-52b5-40a8-b223-e87f0960b04f(jetbrains.mps.build.mps.generator.template.main@generator)/3189788309732145594
model 'MySolution.myModel@0' has been generated with errors
generation completed with errors in 14 ms
Error executing target jetbrains.mps.lang.core.Generate.generate
Project structure and dependencies
Use case
I want to compile MySolution (it will contain baseLanguage classes) as a jar file and then install it as a maven artifact locally. This worked* for me until I added MyLanguage as a dependency to MySolution. After a "The reference MyLanugage (module) is out of search scope." error I added MyLanguage into the "project structure" part of the Ant build file and then the compilation started to fail.
The build file
For reproduction of the problem I created a MCVE on gitlab: https://gitlab.com/HawkSVK/mps-ant-builder
MPS version used: 2019.3, build 193.1331
---
* My mvn install solution is here, if somebody would be interested. If anybody has an advice, feel free to write.
Please sign in to leave a comment.
Can someone help me, please? Or should I report this as a bug?
Today i ran into the same error.
So if anybody knows what to do, let us know, please.
I fixed it for me, Adrian.
I removed the source roots in my language's Common tab and the corresponding libraries and source pathes in Java tab.
So it is only defined in the models, where i need them. After this I was able to build the solution. Maybe this helps you, too.
Patrick, sadly this happened to me even with MyLanguage having no dependencies at all.
However, I have finally fixed my problem today. I was comparing my Build Language file with the one created by MPS when you click on your project > New > Build Solution. And the only difference was the difference in the base directory at the top of the Build file. Funnily, this was the only thing I have not screenshot and put into my post, because I was sure, that it is not important...
Previously I had the Build file inside MySolution like so:
The correct way is to change it to the project root directory: