More findings:
http://localhost:8080/trunk-clean/my-apps/components/demos/house.lzx?lzr=swf10&lzt=cacheinfo
shows compiler-cache disk-total="20000000" disk-in-use="0"
mem-total="1000000" mem-in-use="228762" diskmap-entries="0"
memmap-entries="2" activemap-entries="0"
so maybe disabling that cache for a workaround?
(try)
nope, lzt=clearcache nuked it successfully so it's some sort of
in-memory schema thing...
So then I tried the following patch:
Index: WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
===================================================================
--- WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
(revision 18050)
+++ WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
(working copy)
@@ -401,6 +401,7 @@
makeNewStaticClass("Object", env);
schemaDOM = (Document) sCachedSchemaDOM.clone();
+ sCachedSchemaDOM = null;
Element docroot = schemaDOM.getRootElement();
ToplevelCompiler ec = (ToplevelCompiler)
Compiler.getElementCompiler(docroot, env);
Set visited = new HashSet();
That didn't help...
On 12/20/10 2:35 PM, Henry Minsky wrote:
There's a cache for the schema DOM itself, insCachedSchemaDOM in
ViewSchema.java.
I'll take a look and see if that's causing problems.
On Mon, Dec 20, 2010 at 5:24 PM, P T Withington <[email protected]
<mailto:[email protected]>> wrote:
Clearly there is some cache not getting cleared...
This is probably why we were getting the "unknown type" error even
on programs that were _not_ using gradient.
Feel free to help me hunt the wumpus.
On 2010-12-20, at 16:53, Max Carlson wrote:
> Uh oh. I'm getting an error when I try to recompile house.lzx now:
>
> Error: ../lib/gradienttype.lzx:224:27: Duplicate <type>
definition for gradient; also defined at ../lib/gradienttype.lzx:224
>
> I checked and there's exactly one type declaration (the one you
checked in).
>
> Restarting tomcat allows me to compile for lzr=dhtml, but an
attempt to compile for swf10 fails with the error above...
Restarting tomcat allows me to compile for swf10, but then
recompiling for dhtml leads to the error again.
>
>
> On 12/20/10 2:05 AM, P T Withington wrote:
>> Change ptw-20101220-82u by [email protected] on 2010-12-20 04:54:41 EST
>> in /Users/ptw/OpenLaszlo/trunk-3
>> for http://svn.openlaszlo.org/openlaszlo/trunk
>>
>> Summary: Next step in user<type>s
>>
>> Bugs Fixed: LPP-9589 Unexpected warning information of ''gradient"
>>
>> Technical Reviewer: [email protected]
<mailto:[email protected]> (pending)
>> QA Reviewer: [email protected]
<mailto:[email protected]>, [email protected]
<mailto:[email protected]> (pending)
>>
>> Overview:
>> I've hacked in user-defined types. You can now write the
gradient
>> type as:
>>
>> <type name="gradient">
>> <accept args="value, node:LzNode, attribute:String">
>> return new lz.CSSGradient(value);
>> </accept>
>>
>> <present args="value, node:LzNode, attribute:String">
>> return value.css;
>> </present>
>> </type>
>>
>> I know this is not as general as we wanted, but it's the most I
>> can get working on short notice.
>>
>> Details:
>> Basically the types get compiled as very custom classes at
resolve time.
>>
>> Tests:
>> Rewrite gradienttype.lzx as above and run house.lzx
>>
>> Files:
>> M WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptClass.java
>> M
WEB-INF/lps/server/src/org/openlaszlo/compiler/TypeCompiler.java
>> M
WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
>>
>> Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/ptw-20101220-82u.tar
--
Henry Minsky
Software Architect
[email protected] <mailto:[email protected]>