This seems to be more like an issue of rearranging the reference classes, at least with my test case from the bug report, the reference class for <dataset> is emitted after the class declaration for <mydataset>.

Steps to repro:
$lzc -c mydataset.lzx
$lzc -S main.lzx

The output looks like:
---
dynamic class $lzc$class_mydataset extends LzDataset{ [...] }
;lz["mydataset"]=$lzc$class_mydataset;

#pragma "referenceClass=true"
;dynamic class LzDataset extends LzNode{ [...] }
;
#pragma "referenceClass=false"
---

If the reference class for <dataset> appeared before <mydataset>, things should work as expected without emitting reference classes for lzo's.


On 3/24/2011 4:05 PM, Donald Anderson wrote:
Change dda-20110324-Y7B by [email protected]
<mailto:[email protected]> on 2011-03-24 10:38:25 EDT
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-c
for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fixed with(this) removal for LZO

New Features:

Bugs Fixed: LPP-9835: with(this) still added for some functions that
should be handled via 'this.' binding.

Technical Reviewer: ptw (pending)
QA Reviewer: [email protected] <mailto:[email protected]> (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Overview:
- Added 'errorWithThis' option to force error whenever with(this) emitted.

- Added new test for this case

- Fixed the problem by emitting needed reference classes in lzo files

- Some cleanup of prepare-lzo-test.sh, and make runlzunit.sh
more resilient to timeout errors

Details:
test/lztest/lzodir/lzo-lib-withthis.lzx.proto:
- new lzo file, used pragma errorWithThis to detect if with(this) generated

test/lztest/lztest-lzo-main.lzx
- reference new lzo file

WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
- added errorWithThis option to throw an error.For now, this will be
used for testing specific test cases.

WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
- emit reference classes within LZOs

build-tools/prepare-lzo-test.sh
- reorganized with a shell function to remove duplication
- set exit status for failed compilations

build-tools/runlztest.sh
- use exit status from prepare-lzo-test.sh to die if lzos cannot be built

build-tools/runlzunit.sh
- use exit status from prepare-lzo-test.sh to die if lzos cannot be built
- on OSX, find the browser in standard /Applications location, it cannot
be found as simply 'firefox'.Before this change anyone with their
default browser set to Safari would have Safari be launched. (*)
- if timeout occurs, retry a couple more times before quitting.
This allows the test to work reliably for me, otherwise I need to
run it several times to get a success. (*)

(*) these last two items could be split out if needed

Tests:
smoke, lztest, lzrununit

Files:
Mtest/lztest/lztest-lzo-main.lzx
Atest/lztest/lzodir/lzo-lib-withthis.lzx.proto
MWEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
MWEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
MWEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
Mbuild-tools/runlztest.sh
Mbuild-tools/runlzunit.sh
Mbuild-tools/prepare-lzo-test.sh

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/dda-20110324-Y7B.tar



--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-306-2057
email: [email protected] <mailto:[email protected]>
www: http://www.ddanderson.com <http://www.ddanderson.com/>
blog: http://libdb.wordpress.com





Reply via email to