[OpenLayers-Trac] Re: [OpenLayers] #3158: "build.py -c closure"
does not work on Windows systems.
OpenLayers
trac-20090302 at openlayers.org
Sat Mar 12 17:41:45 EST 2011
#3158: "build.py -c closure" does not work on Windows systems.
--------------------------------------------------+-------------------------
Reporter: jorix | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.11 Release
Component: general | Version: 2.10
Keywords: closure compiler undefined variables | State: Review
--------------------------------------------------+-------------------------
Changes (by jorix):
* keywords: closure compiler => closure compiler undefined variables
* state: => Review
Comment:
The proposed patch attachment:3158.patch has the following
characteristics:
* Fixes two bugs described (blanks in the path and execution failure on
Windows systems due to temporary files) ['''A''']
* When using {{{python build.py -c closure}}}:
* Does not allow undefined variables ['''B''']
* Displays the source file names and line numbers in case of errors or
warnings ['''C''']
* When using {{{python build.py -c closure_ws}}}:
* Makes a pre-compression "jsmin" if the merged code size exceeds
1000KB ['''D''']
* Improved console messages on errors ['''E''']
* The changes have been documented in "README.txt"
I think it is important to use the compiler's ability to detect
'''undefined variables''', a sample of this is that in the last week I
reported '''4 errors''' of this type (see r11663, r11664, r11665 and
r11702)
Implementation:
* It replaces "tools/closure.py" by "[http://code.google.com/p/closure-
library/source/browse/trunk/closure/bin/build/jscompiler.py
tools/closure_library_jscompiler.py]" (solves ['''A'''] and required for
['''C'''])
* In "build/build.py" rewrite the treatment of compression options,
especially for {{{closure}}} and {{{closure_ws}}} (Required for ['''B'''],
['''C'''], ['''D'''] and ['''E'''])
* Creates two new methods in "tools/jsmerge.py" who share common code on
{{{run}}}:
* {{{merge}}}: returns merged code (as was {{{run}}} method) but only
requires two parameters. Used in all compression options except for
{{{closure}}}.
* {{{getNames}}}: returns an array with the names of the sources
resulting from the configuration (Required for ['''C'''])
* Activate different compiler flags ({{{--externs}}},
{{{--jscomp_warning}}} & {{{--jscomp_error}}}) only to detect undefined
variable errors (Required for ['''B'''])
Tested on Windows and Linux for all compression options.
Please review
--
Ticket URL: <http://trac.openlayers.org/ticket/3158#comment:1>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list