The problem

To define editors for your language you used plugins from MPS-extensions or mbeddr platform, such as grammar cells, tables, or diagram editors. Now you want to distribute your language to your users as a plugin. You have created a build script and it looks correct, MPS also tells you there are no errors in it. However, when you try to generate the Ant build file from it, you get the following error message:

cannot find used language in dependencies: com.mbeddr.mpsutil.grammarcells
-- -- was input node: [modules] BuildMps_Language ""[7543781552387218085] in
-- was template node: r:54537613-52b5-40a8-b223-e87f0960b04f(

What’s happening?

The build language tracks dependencies between the listed modules and reports errors when a module is added to the build script yet one of its dependencies is missing. However, it doesn’t track one kind of dependency, namely language use. (There are historical and technical reasons for this which I won’t go into in this post. Let me know if you are curious about these kinds of details and I might write a separate post about it.)

So if a model in your project uses an external language but the module doesn’t otherwise depend on that language, the checking rules of the Build language do not see this dependency and do not check if it can be found. However, to be able to generate the build script, the generator does need to find all the used languages and will complain if any are missing.

How do I fix this?

You need to include as a dependency of your build script the build script for the languages that you used. For example, if you used MPS-extensions:

Dependency on MPS-extensions added to the build script

In this post I provide more detailed instructions on how to add dependencies to popular libraries such as MPS-extensions, mbeddr Platform, or KernelF.