Opened 11 years ago

Closed 9 years ago

#10592 closed defect (fixed)

dojo.config.require files required after dojo base but before modules in a dojo build

Reported by: cb1kenobi Owned by: Rawld Gill
Priority: low Milestone: 1.7
Component: BuildSystem Version: 1.4.0
Keywords: build djconfig require needsreview Cc:
Blocked By: Blocking:

Description

If I create a dojo build that includes dojo.parser, then set djConfig="require:dojo.parser?", it will evaluate the dojo.require()'s to pull in the dojo.config.require after dojo base, but before the build's dependencies.

The code

dojo.forEach(dojo.config.require, function(i){
	dojo["require"](i);
});

should be somehow placed at the end of a dojo.js build.

I don't have a good solution at the moment. I will move my requires outside of the djConfig and explicitly require them after including dojo.js.

Change History (8)

comment:1 Changed 11 years ago by James Burke

Milestone: tbd1.5

Yeah, this is definitely a problem. I think it might be enough to move that block of code to the buildscripts/jslib/dojoGuardEnd.jsfrag which gets added to the end of the dojo.js layer. It means djConfig.require will not work in a source configuration, but probably OK, it is more of an optimization thing and should be used with a built dojo. Just need to make sure the djConfig.require test (or any tests referencing it) reflects that a built version of dojo would be required.

comment:2 Changed 10 years ago by James Burke

Milestone: 1.51.6

comment:3 Changed 10 years ago by dante

could also be a oneliner:

dojo.forEach(dojo.config.require, dojo.require, dojo);

comment:4 Changed 10 years ago by James Burke

If dojo.forEach is available in all possible builds of Dojo. It is likely it will be, but for customBase installs it is not guaranteed.

comment:5 Changed 10 years ago by bill

Milestone: 1.6future

(sadly) punting seemingly abandoned ticket and meta tickets to future

comment:6 Changed 9 years ago by bill

Owner: changed from James Burke to Rawld Gill

Bulk update to assign BuildSystem? tickets to Rawld. Many of these are probably already fixed in 1.7.

comment:7 Changed 9 years ago by ben hockey

Keywords: needsreview added
Priority: highlow

comment:8 Changed 9 years ago by Rawld Gill

Milestone: future1.7
Resolution: fixed
Status: newclosed

Fixed in 1.7.

Note: See TracTickets for help on using tickets.