[dojo-contributors] Tentative agenda for today meeting

Richard Backhouse backhous at us.ibm.com
Wed Oct 3 11:23:31 EDT 2012


Zazl will add ids for modules that are scanned for define calls. The
problem is that the "define" call is not located by the optimizer in the
server, the result being that no id is inserted and none of it dependencies
are added to the list to be included in the js stream. As it happens all of
it dependencies are dependencies that other modules have. The Zazl AMD
loader expects that when its "define" function is called that an id is in
the signature as it cannot depend on the request URL to resolve the id
itself (there is no request that is made to load the module). With a
hardcoded id the module is at least loaded as an AMD module in the client
and is available to other modules that depend on it.

I can consider adding more code to the AST parsing section to find it. Does
the dojo build handle this module correctly ?

Why do you not think an id should be added ?


                                                                                                                       
  From:       Ben Hockey <neonstalwart at gmail.com>                                                                      
                                                                                                                       
  To:         "dojo dev." <dojo-contributors at mail.dojotoolkit.org>,                                                    
                                                                                                                       
  Date:       10/03/2012 11:12 AM                                                                                      
                                                                                                                       
  Subject:    Re: [dojo-contributors] Tentative agenda for today meeting                                               
                                                                                                                       






On Oct 3, 2012, at 9:59 AM, Richard Backhouse wrote:

      If that's the case then what is the harm with adding a module id to
      the define call :

      (typeof define === "undefined" ? function(id, deps, def) { def(); } :
      define)("dojox/mobile/deviceTheme", [
      "dojo/_base/config",
      "dojo/_base/lang",
      "dojo/_base/window",
      "require"
      ], function(config, lang, win, require){

      I know it's not recommended to hard code ids but I think this can be
      considered a special case, especially as loading via AMD is
      discouraged. This is the patch we use to get it loading in Maqetta
      with Zazl

i don't think we should add a module id but  what's prompted my reply is
that i'm really curious why the static analysis works with a module id but
it doesn't work without one.  it sounds like it works for all the other
modules without a module id so why does the static analysis need one for
this module?  why can't the static analysis be fixed to work without the id
when it seems it works for all the other modules without ids?

ben..._______________________________________________
dojo-contributors mailing list
dojo-contributors at mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20121003/25e9874f/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20121003/25e9874f/attachment.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20121003/25e9874f/attachment-0001.gif 


More information about the dojo-contributors mailing list