It cannot be calculated in which module's output path the class file for ... must be placed

I have a language that generates to multiple targets, one of them BaseLanguage. I duplicate the concepts of the models for each target language. Building the solution generates the correct Java sources in the sources_gen folder but no corresponding class files in classes_gen. It gives the following errors during a rebuild:

 [jetbrains.mps.make.ModuleMaker] It cannot be calculated in which module's output path the class file for ZVW.$Belastingplichtige must be placed
 ... similar errors for other generated enums and classes...
 [jetbrains.mps.make.ModuleMaker] Compilation Passed But The Changed Modules Are Empty

The intermediate transient model looks fine and I get the following Java source, which appears correct.

package ZVW;

/*Generated by MPS */

public final class $Belastingplichtige {
  public final byte[] $Burgerservicenummer;
  public final String entiteittypeNaam = "Belastingplichtige";
  public $Belastingplichtige(final byte[] $Burgerservicenummer) {
    this.$Burgerservicenummer = $Burgerservicenummer;

Can someone enlighten me about the ModuleMaker error message? I can provide the project upon request.
I also could not find a way to set the Java package name, which may or may not be related to this.

Comment actions Permalink

Hello A Van Weelden,


Have you tried to rename the model (Refactoring > Rename Model) to ""?



Sérgio Ribeiro

Porto - Portugal


Comment actions Permalink

Changing the module name does change the package name. Thank you! Unfortunately, I have no control over the name of the module, my users decide upon the name. I tried changing the module name in the pre-processing script, but that does not have the same effect. Is there a way to set the package name from within code?

I still have the same error message from jetbrains.mps.make.ModuleMaker. I generate BaseLanguage via a root mapping rule. For root concepts, I do not get the error message. But for non-root concepts, I do get the error message. The generated Java code looks the same to me. I do not understand why this makes a difference.

Comment actions Permalink

It looks like the error message has disappeared. All I have changed is the way the name of Java classes is generated from the names in the models. I no longer generate $ at the front of (or inside) the Java names. Instead I used _ and gencontext.unique name from.

It looks like the error message was caused by using dollarsigns in (the beginning of) identifier names. Which suprises me, because $ is a valid part of a Java identifier


Please sign in to leave a comment.