Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#15402 closed defect (fixed)

Cross-domain loaded standard + noref build fails to load same-domain legacy modules when dojo/require is excluded from built layer

Reported by: Colin Snover Owned by: Rawld Gill
Priority: undecided Milestone: 1.8
Component: BuildSystem Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

  1. Using attached profile, run a build
  2. Copy test2 directory to the correct place in the release directory
  3. Update the URL to the built dojo.js in test.html
  4. Load test.html

Expected:

Factory for module B does not execute until after module A’s factory has executed

Actual:

Factory for module B executes before module A’s factory has executed, resulting in “test is not defined” error

Workarounds:

  1. Ensure dojo/require is built into dojo.js.
  2. dojo.require another built module before dojo.requireing the unbuilt local module.

This issue happens against both the latest 1.7 branch and trunk.

Attachments (1)

15402-sample.zip (1.9 KB) - added by Colin Snover 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by Colin Snover

Attachment: 15402-sample.zip added

comment:1 Changed 8 years ago by Colin Snover

Milestone: tbd1.7.3

comment:2 Changed 7 years ago by Colin Snover

Milestone: 1.7.31.7.4

1.7.3 has been tagged. Moving tickets to next milestone. Ticket owners, if you are not planning on addressing this issue in 1.7.x branch please do something with your ticket.

comment:3 Changed 7 years ago by Rawld Gill

Status: newassigned

@csnover: thanks for the excellent report; it made finding the problem much easier.

The root problem is that the dojo/require builder plugin is not adding dojo/require as a dependency for a module that has a dojo/require!some/module dependence. The same problem exists for the dojo/loadInit plugin.

As mentioned above, the simple work-around is to simply build dojo/require and dojo/loadInit into dojo.js or explicitly load these modules before they are needed,

comment:4 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [29075]:

improve dojo/require and dojo/loadInit builder plugins to report dojo/require and dojo/loadInit dependencies respectively; fixes #15402; !strict

comment:5 Changed 7 years ago by Rawld Gill

Milestone: 1.7.41.8

comment:6 Changed 7 years ago by Rawld Gill

Component: LoaderBuildSystem
Note: See TracTickets for help on using tickets.