Play 3.0.1 build/compile order #12361
-
I have a problem caused by the order in which the code is compiled. The
Building the project causes a compilation error in a Twirl template:
on this template code:
where the second argument to defining
is a call to the project entitymachine in the dependency (returning a String value). If I replace this with a constant String, the bulid is successful. If I then put the original code back, the build is successful. So, it seems like the Twirl template is compiled before the dependency project is compiled, so that code is not yet available. Or is there something else? Either way, what can I do about it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Try replacing this line ).dependsOn(entitymachine) with ).aggregate(entitymachine).dependsOn(entitymachine) so the project you dependon will be compiled also when compiling your main project. |
Beta Was this translation helpful? Give feedback.
Never mind, I was barking up the wrong tree all the time. The actual problem is that Twirl doesn't accept empty parentheses for method calls without parameters:
doesn't work (immediately)
does.