Opened 9 years ago

Closed 8 years ago

#13201 closed enhancement (fixed)

Loading 1.6- module in async mode fails

Reported by: Kris Zyp Owned by: Rawld Gill
Priority: high Milestone: 1.7
Component: Loader Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

Loading 1.6- modules in async mode fails if the module assigns a different value to the corresponding module namespace (as most modules do via dojo.declare). Checking in a failing test case to illustrate problem. This is a regression from [25409].

Attachments (2)

provide.diff (4.5 KB) - added by Kris Zyp 9 years ago.
provide-build.diff (1.2 KB) - added by Kris Zyp 9 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 9 years ago by Kris Zyp

Added test dojo.tests._base.loader.asyncWithDojoRequire to demonstrate the problem.

comment:2 Changed 9 years ago by Kris Zyp

Or should we be giving up on loading 1.6- directly from async modules, and get the dojo-require! plugin in there to handle that?

comment:3 Changed 9 years ago by Rawld Gill

Status: newassigned

Changed 9 years ago by Kris Zyp

Attachment: provide.diff added

Changed 9 years ago by Kris Zyp

Attachment: provide-build.diff added

comment:4 Changed 9 years ago by Kris Zyp

Added patches for the dojo/provide! approach to solving this bug.

comment:5 Changed 9 years ago by bill

I had wondered the same thing (ie, whether AMD modules should be able to load non-AMD modules as dependencies). Note that as you can see from #13167 our current code base is doing it. Anyway, Rawld told me it was supposed to work, hence [25409].

comment:6 Changed 9 years ago by Rawld Gill

(In [25486]) improved loading dojo.provide-style modules when loader is in async mode; refs #13201; !strict

comment:7 Changed 9 years ago by Rawld Gill

[25486] seems to fix immediate problem; keeping this ticket open until we decide what to do with dojo/provide! plugin

comment:8 Changed 9 years ago by Kris Zyp

This actually seems to still not be working for me completely. I am trying to load "dojox/gantt/GanttChart" (from async Dojo) and it is intermittently failing to call dojo.date.locale.getNames in the constructor(due to dojo/data/locale.js factory not being executed in time).

comment:9 Changed 9 years ago by Kris Zyp

Also, it just started failing to GanttChart? after some of the new updates from Dijit (before the latest updates to Dijit it was loading fine).

comment:10 Changed 9 years ago by Rawld Gill

Priority: highestnormal
Type: defectenhancement

For the record: there was never a guarantee that the 1.7 loader would load old-style modules asynchronously.

Loading old-style modules synchronously should work; specific, reduced use cases of a failure there would be welcome.

comment:11 Changed 8 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

fixed in or before [25768]. See also #13255.

Note: See TracTickets for help on using tickets.