improved compile units caching that skips desugar/transformation step
Experimenting with improved compile units caching that skips desugar/transformation step for definitions that haven’t changed.
Use ‘compile-units-cache=true’ in application.ini to try this feature (trunk version).
Submitted by Danny Groenewegen on 8 July 2012 at 12:43
Issue Log
There is a bug that is probably caused by cuc: When I rebuild researchr using cuc, I am unable to sign out on the website. This issue was fixed after a clean build.
Edit: Got it reproduced, just by rebuilding with cuc set to true. Also, another symptom is that I get an empty confirmation mail when I change my email-address in my account in a cuc-enabled build of researchr:
[14:59:16 researchr] home: principal: Elmer Test/110dedf5-0c11-4723-XXXXX [14:59:17 researchr] ERROR Problem occurred in template call: elements() [14:59:17 researchr] ERROR java.lang.RuntimeException template lookup failed for name: confirmEmailChangeEmailEmailChange_ta0EmailChange at org.webdsl.lang.Environment.getTemplate(Environment.java:38) [14:59:17 researchr] ERROR Problem occurred in template call: elements() [14:59:17 researchr] ERROR java.lang.RuntimeException template lookup failed for name: confirmEmailChangeEmailEmailChange_ta0EmailChange at org.webdsl.lang.Environment.getTemplate(Environment.java:38)
Above issues are fixed.
The idea is to enable compile-unit caching by default in the next release. We might disable, or make the cuc reporting cleaner during compilation.
New issue:
AC action rules seem to be discarded in non-clean build when template changed. Also, the compiler log reports unused rule in subsequent builds.Edit: might also apply to AC rules in general, not only action rules.
rule template someTemplate( ) { true rule action doSomething() { //action button is visible in second build false } } template someTemplate( ){ action doSomething(){ return; } form{ submit doSomething(){ "change this text and rebuild" } } }
You also mentioned that the conditional visibility of navigates based on their ac rules does not work correctly with compile units cache. The ac rule for a page should be considered part of its signature, since the navigate call changes when the ac rule changes. In the current implementation of compile units cache we need to keep the page ac rules in the AST when any template content is changed to avoid this problem. A more thorough fix would be to collect ac rules in the declare step instead of during desugaring/transformations.
Added
test-web-twice
which now gets invoked on the buildfarm, running all tests twice.
Changing a template argument from
v : Ref<XXXXX>
tov : XXXXX
(not sure whether it needs to be an ajax template) causes runtime class-cast errors. Clean build fixes this:[24 Jan 16:11:17 conference] ERROR Problem occurred in template call: addEventToSlotsSet_ProgramSlot_(schedule.slots) [24 Jan 16:11:17 conference] ERROR java.lang.ClassCastException webdsl.generated.templates.RefArg_addEventToSlotsSet_ProgramSlot__1_editProgramSchedule_ta9List_ProgramSlot___ProgramSchedulepc0 cannot be cast to java.util.Set at webdsl.generated.templates.addEventToSlotsSet_ProgramSlot__Template.storeArguments(addEventToSlotsSet_ProgramSlot__Template.java:52)
Changing the types in function arguments seems to get ignored. E.g. I changed a signature from
function maxLength( lists : [[Entity]] ) : Int
tofunction maxLength( lists : [[ProgramSlot]] ) : Int
, because of another bug, but compilation kept failing in java compilation phase.
Log in to post comments