Hey Tucker, Here are a few issues that I ran into immediately after compiling one of our libraries:
- library.lzo isn't auto-included like library.lzx is. If I move or delete
library.lzx, I get a compilation error.
- The app doesn't recompile for newer .lzo's. I have to modify the main LZX
for changes to take.
- The compiler barfs with stylesheets:
Exception compiling css: [Element: <stylesheet [Namespace:
http://www.laszlosystems.com/2003/05/lzx]/>], null
Compilation errors occurred:
library.lzx:17:38: Error compiling css. null
org.openlaszlo.compiler.CompilationError: library.lzx:17:38: Error compiling
css. null
at org.openlaszlo.compiler.StyleSheetCompiler.compile(Unknown Source)
at org.openlaszlo.compiler.Compiler.compileElement(Unknown Source)
at org.openlaszlo.compiler.ToplevelCompiler.compile(Unknown Source)
at org.openlaszlo.compiler.LibraryCompiler.compile(Unknown Source)
at org.openlaszlo.compiler.Compiler.compileElement(Unknown Source)
at org.openlaszlo.compiler.Compiler.compile(Unknown Source)
at org.openlaszlo.compiler.Compiler.compile(Unknown Source)
at org.openlaszlo.compiler.Main.compile(Unknown Source)
at org.openlaszlo.compiler.Main.lzc(Unknown Source)
at org.openlaszlo.compiler.Main.main(Unknown Source)
- If an LZX file includes libraries included by the .lzo, you see duplicate
class definition errors like:
./../xxx.lzx:11:40: duplicate class definitions for model; also defined at ../../library.lzo:280
There were other problems I couldn't reproduce in test cases, like not being able to find datasets that should be included in the library. I'm running the latest trunk and ran an "ant stop clean build start". Thanks, pablo On Mon, 5 Feb 2007, P T Withington wrote:
Never mind. Found it. I am adding this to my change and checking in (smoketest passes in swf6 and 7 now).Index: LzLoadQueue.as =================================================================== --- LzLoadQueue.as (revision 3606) +++ LzLoadQueue.as (working copy) @@ -510,7 +510,7 @@ var qargs = LzLoadQueue.qargs; for ( var keys in qargs ) { var key = qargs[keys]; - if (typeof (loadobj[key] != "undefined")) { + if (typeof (loadobj[key]) != "undefined") { lvar[key] = loadobj[key]; } } On 2007-02-05, at 19:27 EST, P T Withington wrote:Good catch, Max. I made an invalid 'optimization' thinking that `props` and `env.getProperties()` were the same thing. They are not. Reverting that fixes all the testUndefinedErrors errors, but the bug_1315 and bug_1046 errors on swf6 persist. They also show up prior to my change, though. In fact, prior to my change, smokecheck exhibits a number of other errors due to NaN tests.Will you approve if I don't fix the pre-existing failures, but simply file a bug on them? I'd like to get this in so Sarah can start testing the feature.On 2007-02-05, at 16:51 EST, Max Carlson wrote:Smokecheck fails for me: http://localhost:8080/trunk/test/smoke/smokecheck.lzx Gives: Tests: 697 Failures: 9 Errors: 0TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 12 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 11 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 10 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 9 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 8 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 7 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 6 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 5 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 4 got 2http://localhost:8080/trunk/test/smoke/smokecheck.lzx?lzr=swf6 Tests: 701 Failures: 11 Errors: 0TestFailure: bug_1315 >>> testRespHeaders failed: Equals: expected "" got «string(85)#67| "Server=Apache-Coyote/1.1&Date=Mon, 05 Feb 2007 21:49:39 GMT&ETag=W/\"68-1152242832000\""» TestFailure: bug_1046 >>> testStart failed: Equals: expected "" got "Server=Apache-Coyote/1.1&Date=Mon, 05 Feb 2007 21:49:52 GMT&Expires=Fri, 05 Oct 2001 00:00:00 GMT" TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 12 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 11 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 10 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 9 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 8 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 7 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 6 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 5 got 2 TestFailure: IntentionalErrors >>> testUndefinedErrors failed: Total number of expected errors: expected 4 got 2P T Withington wrote:UPDATE: This is ready for review. If you could review it ASAP, I would like to get it checked in so people can start testing it.---Change 20070131-ptw-V by [EMAIL PROTECTED] on 2007-01-31 10:59:47 ESTin /Users/ptw/OpenLaszlo/trunk Summary: binary libraries in 3.4 Bugs Fixed: LPP-3438: 'Implement "binary libraries"' Technical Reviewer: hminsky (pending) QA Reviewer: max (pending) Doc Reviewer: sallen (pending) Documentation: To create a binary library, you compile the library as: lzc -c library.lzx This creates a `library.lzo` file in the same directory. Any program that includes the `library.lzx` will prefer the .lzo if that is found. It is up to your build process to ensure that the .lzo file is kept up to date. Details: Back-port of this feature to 3.4. As you can see, I hardly had to change anything to get it to work in 3.4. Detailed details: [Changes ported from Legal's are marked with `-`, new changes are marked with `+`] - lzunit-test: Handle Flash 9 player - lzx.rnc: New element <interface> can be used to extend schema, script tag can take `when` and `type`. - SimpleNode: don't bomb when adding children via set. + FileUtils: open .lzo files as GZIP. + ComparisonMap: maintain entry order. - ReferenceCollector: Eliminate redundant constraints, properly express contraints on global functions, sanitize names. - Compiler: Unparse super calls - Assembler: Correct assoc-oh in block out of range error message. + Compiler, CodeGenerator, ToplevelCompiler, SWFFile: Remove Krank Kruft - Compiler, CodeGenerator: back-port compressing/obfuscating unparser, and other miscellaneous compiler improvements. + JavascriptCompressor: Adapted from Legal's JavascriptGenerator + CompilerError, CompilerImplementationError: Adapt to new location string + Function: Permit overriding name, maintain source-location info. - ScriptClass: Scaffolding for outputting an LZX class as a JS class. - LibraryCompiler: Load .lzo (binary) library if available. - ClassCompiler: Split out actual generation of class code so it can be overridden in a subclass. - ViewCompiler, ResourceCompiler, FontCompiler, CompilationEnvironment, Compiler: Permit compiling of <library> without <canvas> + ToplevelCompiler: Compile interfaces, maintain auto-include information - InterfaceCompiler: Compiles an <interface>, updating the schema. + ViewSchema, AttributeSpec, ClassModel: Add toLZX method that generates an <interface> from the schema. + SWFWriter: open to subclassing - LibraryWriter: New compiler back-end, subclass of SWFWriter, captures object-code and outputs it to a binary library. - CompilationEnvironment: Store object file so back-ends can relativize paths. + DataCompiler: If not compiling to canvas, defer compiling data. + NodeModel: Store methods in class model, use new location format for functions, ensure generated method names are unique. - ScriptElementCompiler: support `when='immediate'`- Compiler, Main: New option '-c' permits compiling a <library> to .lzo.- Compiler: Add InterfaceCompiler. + ClassModel: Make comparable so classes can be sorted according to superclass, add hasNodeModel to tell when a class has had code generated for it, maintain class method specifications. Tests: smoketest Files: M test/smoke/lzunit-test.lzl M WEB-INF/lps/schema/lzx.rnc M WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/SimpleNode.java M WEB-INF/lps/server/src/org/openlaszlo/utils/FileUtils.java M WEB-INF/lps/server/src/org/openlaszlo/utils/ComparisonMap.java M WEB-INF/lps/server/src/org/openlaszlo/sc/ReferenceCollector.java M WEB-INF/lps/server/src/org/openlaszlo/sc/Assembler.java M WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java M WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java A WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptCompressor.java M WEB-INF/lps/server/src/org/openlaszlo/sc/CompilerError.java M WEB-INF/lps/server/src/org/openlaszlo/sc/Function.javaM WEB-INF/lps/server/src/org/openlaszlo/sc/CompilerImplementationError.javaA WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptClass.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/LibraryCompiler.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/ResourceCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/ToplevelCompiler.java A WEB-INF/lps/server/src/org/openlaszlo/compiler/InterfaceCompiler.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFWriter.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFFile.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/FontCompiler.java A WEB-INF/lps/server/src/org/openlaszlo/compiler/LibraryWriter.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/DataCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/ScriptElementCompiler.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/AttributeSpec.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.javaChangeset: http://svn.openlaszlo.org/openlaszlo/patches/20070131-ptw-V.tar-- Regards, Max Carlson OpenLaszlo.org
