I tried making a remodularization of how we pass the compilation environment around, but it proved to be too much of a mess, so this is the original change I had proposed, plus code which writes out separate snippet object files for each runtime that you compile, to avoid the caching problem that Max was seeing.
Change 20100122-hqm-F by [email protected] on 2010-01-22 13:41:34 EST in /Users/hqm/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: fix for bug in swf10 (and other runtimes) snippets New Features: Bugs Fixed: LPP-8727 bug in dynamic libraries Technical Reviewer: ptw QA Reviewer: max Doc Reviewer: (pending) Documentation: Release Notes: Overview: When the compiler compiles an <import> library, it makes a new compilation environment for emitting the code. However the ClassModels that it looks up may have the compilation environment of the main app, as they may have been created during the updateSchema phase. Details: ImportCompiler: Put the name of the runtime into the pathname of each snippet object file, so that user doesn't accidentally load a swf8 library into a swf10 runtime or vice-versa ClassCompiler: The change is to set the classmodel's CompilationEnvironment to the current Compiler's value, so that any anon classes that get made will inherit that value. NodeModel: ensure that class is always emitted (this wasn't the bug in this case, but seemed like an oversight) ClassModel: make env var public, so it can be set by the ClassCompiler Tests: run in swf8,10,dhtml test/snippets/import-class-and-view.lzx test/snippets/lpp-8727.lzx test/snippets/import-view.lzx test/snippets/import-class-and-view.lzx test/snippets/import-class-and-view-direct.lzx test/snippets/import-class-resource.lzx test/snippets/import-dataload.lzx?lzr=swf10 ant runlzunit Files: A test/snippets/class-and-view-library-noproxied.lzx M test/snippets/class-resource-library.lzx M test/snippets/import-class-and-view-direct.lzx M test/snippets/class-and-view-library.lzx A test/snippets/lpp-8727-library.lzx M test/snippets/class-and-view-library-proxied.lzx A test/snippets/lpp-8727.lzx M test/snippets/import-class-resource.lzx M WEB-INF/lps/config/lps.properties M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/ImportCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100122-hqm-F.tar _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
