I'm going to check this in ahead of review because I think the current state of things is emitting too many false positives.
On 2009-11-20, at 16:49, P T Withington wrote: > Change 20091120-ptw-7 by [email protected] on 2009-11-20 16:36:45 EST > in /Users/ptw/OpenLaszlo/trunk-2 > for http://svn.openlaszlo.org/openlaszlo/trunk > > Summary: Minimize <switch> warnings when library compiling > > New Features: > > Bugs Fixed: LPP-8623 Library compiler should complain about <switch> tags > > Technical Reviewer: max (pending) > QA Reviewer: henry (pending) > > Release Notes: > > We can't allow <switch> in files that will be compiled into a > binary library. > > There are two workarounds: > > 1) If the switch statement is really just including different > versions of Javascript, rewrite the switch as a <script> block. > > 2) If the switch statement is including different versions of LZX > code, you will have to move the switch statement out of the > library. It can be in an include file that is external to the > library (so long as it is not conditionally defining new > classes). > > Overview: > > Only warn about switch statements in includes that are external to > a library being binary-compiled if that switch statement contains > conditional includes or class declarations. > > Details: > Move logic for determining when an include is external to a > library from ToplevelCompiler to CompilationEnvironment. > > Conditionalize warning in Parser to only complain if binary > compiling and either switch is internal to the library or the > switch contains include or class tags. > > Tests: > binary library with <switch> issues a warning. > > binary library that includes <drawview> no longer issues a warning. > > binary library with external include that contains a <switch> that > contains an <include> issues a warning. > > > Files: > M WEB-INF/lps/server/src/org/openlaszlo/compiler/ToplevelCompiler.java > M > WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java > M WEB-INF/lps/server/src/org/openlaszlo/compiler/Parser.java > > > Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20091120-ptw-7.tar _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
