Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#2195 closed defect (fixed)

Support require/requireIf statements in custom build.

Reported by: James Burke Owned by: James Burke
Priority: high Milestone:
Component: BuildSystem Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

Be able to support require/requireIf statements in a custom build. Right now they are stripped out because it causes some havoc when loading. The requireIf support is really important since some modules like dojo.gfx and chart won't work in a custom build.

Use an approach similar to what is used in xdomain loading where dojo.hostenv.callLoaded is changed so that it will try to load any additional resources before actually firing the loaded event. Modify the require/requireIf code to store off what is being asked for until dojo.js finishes loading, then try to resolve the outstanding require/requireIf calls in the dojo.hostenv.callLoaded before proceeding with the loaded event.

Attachments (3)

makeDojoJs.js (761 bytes) - added by James Burke 13 years ago.
File used from build.xml to create uncompressed dojo.js file.
2195.patch (21.3 KB) - added by James Burke 13 years ago.
listProfileDeps.js (344 bytes) - added by James Burke 13 years ago.
JS file that backs the list-profile-deps ant target.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by James Burke

Added patch to ticket. Going to publish info about the patch, and if no one hollers I'll apply it.

comment:2 Changed 13 years ago by James Burke

Component: GeneralBuildSystem

Changed 13 years ago by James Burke

Attachment: makeDojoJs.js added

File used from build.xml to create uncompressed dojo.js file.

comment:3 Changed 13 years ago by James Burke

I updated this ticket with an improved patch. This one puts all the dojo.provide() calls together after bootstrap2.js, and removes any matching dojo.require statements. It also uses JS to build the uncompressed JS file, and the Jython dependencies in build.xml have been totally removed.

I removed the following ant targets from build.xml:

  • -set-profile-deps (this work done inside MakeDojoJs?.js now)
  • list-profile-deps (this work done inside MakeDojoJs?.js now)
  • list-profile-sizes (didn't seem useful since it compared uncompressed file sizes)

I am planning on deleting the following files. If you need one of these things, speak up now, or I will delete them:

  • buildscripts/buildUtil.py (only has a buildTestFiles function now, but it was never called in build.xml. I'm assuming it is a historical artifact).
  • buildscripts/lib/jython.jar
  • buildscripts/lib/pyLib.zip

requireIf/require statements are now supported in the custom builds. I tested with dojo.widget.Chart with a regular and xdomain build.

Changed 13 years ago by James Burke

Attachment: 2195.patch added

Changed 13 years ago by James Burke

Attachment: listProfileDeps.js added

JS file that backs the list-profile-deps ant target.

comment:4 Changed 13 years ago by James Burke

Updated the patch to include a list-profile-deps target to just list files that will be in dojo.js, and created a -set-profileFile target that does the JS script work to set profileFile once in the file instead of having the copy/pasted code.

comment:5 Changed 13 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [7003]) Fixes #2195, and removes Jython/python as a build dependency

comment:6 Changed 13 years ago by alex

Resolution: fixed

(In [7008]) Merged revisions 6993-7007 via svnmerge from svn+ssh://alex@svn.dojotoolkit.org/var/src/dojo/trunk

........

r6994 | peller | 2007-01-04 21:52:39 -0800 (Thu, 04 Jan 2007) | 1 line

fix syntax, commas, whitespace in generated JSON files

........

r6995 | peller | 2007-01-04 21:56:47 -0800 (Thu, 04 Jan 2007) | 1 line

remove empty generated i18n JSON files

........

r6997 | bill | 2007-01-07 03:48:53 -0800 (Sun, 07 Jan 2007) | 1 line

button benchmark

........

r6998 | bill | 2007-01-07 05:49:36 -0800 (Sun, 07 Jan 2007) | 1 line

Fix #440: bleed through of <select> boxes on IE6

........

r6999 | bill | 2007-01-07 09:12:01 -0800 (Sun, 07 Jan 2007) | 4 lines

Fix color dialog display. In a previous checkin I removed the showAt() function from ColorPalette?, so now I changed ToolbarDialog? to leverage PopupContainer? to position it's child.

........

r7000 | bill | 2007-01-07 10:51:16 -0800 (Sun, 07 Jan 2007) | 5 lines

Fix #2152.

Displaying the dom node offscreen, with position=absolute, seems to miscalculate height, assuming that lines don't wrap. Changed it to use visibility=hidden rather than displaying element off screen. Seems to work better; cross your fingers :-)

........

r7001 | liucougar | 2007-01-07 23:51:40 -0800 (Sun, 07 Jan 2007) | 2 lines

fixes #2210 and #2145 added a parameter to Editor2::restoreSelection

........

r7002 | liucougar | 2007-01-07 23:53:57 -0800 (Sun, 07 Jan 2007) | 1 line

separate getParentOfType API from getAncestorElement

........

r7003 | jburke | 2007-01-08 11:29:42 -0800 (Mon, 08 Jan 2007) | 1 line

Fixes #2195, and removes Jython/python as a build dependency

........

r7004 | skinner | 2007-01-08 15:33:34 -0800 (Mon, 08 Jan 2007) | 1 line

minor work on dojo.data unit tests

........

r7005 | skinner | 2007-01-08 16:40:48 -0800 (Mon, 08 Jan 2007) | 1 line

more work on dojo.data test page

........

r7006 | skinner | 2007-01-08 18:25:32 -0800 (Mon, 08 Jan 2007) | 1 line

added a FilteringTable? binding for the dojo.data test page

........

comment:7 Changed 12 years ago by James Burke

(In [7054]) References #2195, and removes Jython/python as a build dependency (merge from trunk)

comment:8 Changed 12 years ago by James Burke

Milestone: 0.90.4.2

Merged into 0.4 branch for 0.4.2.

comment:9 Changed 12 years ago by (none)

Milestone: 0.4.2

Milestone 0.4.2 deleted

Note: See TracTickets for help on using tickets.