Compilation problems generator after adding template parameters

Hi,

After refactoring my project's generator (I have added parameters to templates and template switches), the generator cannot be created anymore. These are the errors:

 

[jetbrains.mps.make.ModuleMaker] Cycle #1: [[HFConstraints/main [generator]]]
[jetbrains.mps.make.CompilationErrorsHandler@29e0864c] Compilation problems
[jetbrains.mps.make.CompilationErrorsHandler@29e0864c] Modules: [HFConstraints/main [generator]];
Classpath: classpath {
jar-cp: C:\MH\MPS-2018.1.4\MPS 2018.1\lib\mps...}

[jetbrains.mps.make.CompilationErrorsHandler@29e0864c] main\QueriesGenerated.java : This method must return a result of type Object (line: 424)
[jetbrains.mps.make.CompilationErrorsHandler@29e0864c] main\QueriesGenerated.java : This method must return a result of type Object (line: 427)
[jetbrains.mps.make.CompilationErrorsHandler@29e0864c] main\QueriesGenerated.java : This method must return a result of type Object (line: 430)
Compilation finished: 3 errors, 0 warnings.
Error executing target jetbrains.mps.make.facets.JavaCompile.compile

 

The relevant QueriesGenerated.java file fragments are the following:

 

public static Object templateArgumentQuery_8064336679418686991(final TemplateArgumentContext _context) {
return ;
}
public static Object templateArgumentQuery_8064336679418691498(final TemplateArgumentContext _context) {
return ;
}
public static Object templateArgumentQuery_8064336679419182195(final TemplateArgumentContext _context) {
return ;
}

 

I have no idea what causes this. I tried finding the numeric identifiers but failed. Any suggestion to solve this is appreciated! Thanks!

 

Martijn

2 comments
Comment actions Permalink

LIkely, bodies of query functions are not specified in template invocation ($CALL$) of your parameterized template

0
Comment actions Permalink

Thanks for your reply. I indeed discovered that the query functions that I used  were the cause. It was quite confusing as MPS didn't give any feedback in the UI when editing the template invocation. Anyway, I worked around it.

 

0

Please sign in to leave a comment.