[OpenLayers-Trac] Re: [OpenLayers] #3008: Build: Integrate Closure Compiler on OpenLayers

OpenLayers trac-20090302 at openlayers.org
Thu Feb 24 19:30:24 EST 2011


#3008: Build: Integrate Closure Compiler on OpenLayers
---------------------+------------------------------------------------------
 Reporter:  jorix    |       Owner:        
     Type:  feature  |      Status:  new   
 Priority:  minor    |   Milestone:  Future
Component:  general  |     Version:  2.10  
 Keywords:           |       State:        
---------------------+------------------------------------------------------
Changes (by crschmidt):

  * state:  Review =>
  * milestone:  2.11 Release => Future


Comment:

 jorix: Before looking at this patch (in response to another closure
 compiler patch) I went ahead and added support for closure compiler to the
 existing build tools. This functionality is much simpler than what you've
 built, but it seems like you were really building something much more
 complex than I think needs to be included in OpenLayers; essentially, you
 were replicating the entire command line parsing of Closure in OpenLayers.

 I think that it is reasonable to debug OpenLayers in closure by simply
 building an uncompressed build (python build.py -c none) then running
 closure on the resulting file with the options you want.

 I expect if we make a shift to ADVANCED_OPTIMIZATIONS we may need to
 enable more complex parsing and optimization, but for now I've simply
 enabled the default closure options (SIMPLE), and things seem to work
 okay.

 I'm interested in what else this patch is trying to achieve. I see the
 following:
  * build/closure-compiler/OpenLayers/externs/errors-pending-to-fix-
 undefined-variables.js looks pretty simple: just various bugfixes that I
 should go review and fix. No problem.
  * It looks like build/closure-compiler/OpenLayers/externs/Externs.js is
 simply designed around preventing warnings, something I'm not super-
 concerned about at the moment
  * lib/OpenLayers/Events.js looks to be the same
  * tools/mergejs.py Seems to be based around letting closure find the
 files individually, instead of in one big chunk? is that right? And I
 assume that comes in part from the desire to support the jsDoc stuff in
 closure? Can you explain this part of the patch more?
  * tools/NaturalDocs2JsDoc.py looks interesting for future work, but not
 neccesary right now
  * build/closure-compiler/closure-
 compiler/contrib/externs/google_maps_api_v2.js I'm assuming is to prevent
 more errors?

 I assume that these externs and so on would be more neccesary if we were
 going to approach full closure ADVANCED support, but with the simple
 support, things seem to be working without, so I'm going to hold off on
 moving forward on reviewing the work in this ticket until we're ready to
 approach closure more thoroughly (or we find a bug in the current closure
 behavior).

 Thanks for the pointer!

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3008#comment:7>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list