Opened 13 years ago

Closed 10 years ago

#8588 closed defect (invalid)

Cross Domain build exception

Reported by: vincentastek Owned by: vincentastek
Priority: high Milestone: future
Component: BuildSystem Version: 1.2.3
Keywords: cross domain build runtime exception Cc: [email protected]
Blocked By: Blocking:



I'm trying to make a cross domain build of dojo using the following command :

build.bat profile=toto action=clean,release loader=xdomain xdDojoPath= optimize= layerOptimize=

I got the following exception :

js: uncaught JavaScript? runtime exception: TypeError?: Cannot read property "index" from null

I tracked this error and it happens when build.js calls (l.171) :

fileContents = buildUtilXd.setXdDojoConfig(fileContents, kwArgs.xdDojoPath,logger);

The error seems to happen in buildUtil.js in the following section (l.17) :

var match = fileContents.match(/(dojo\.registerModulePath\s*=\s*function.*\{)/);

Find the next two } braces and in inject code after that. var endIndex = fileContents.indexOf("}", match.index); endIndex = fileContents.indexOf("}", endIndex + 1); if(fileContents.charAt(endIndex + 1) == ";"){

endIndex += 1;

} endIndex +=1;

I'm attaching the complete log output and my profile file. Please provide any help.


Attachments (2)

toto.profile.js (492 bytes) - added by vincentastek 13 years ago.
Profile file
log.txt (2.1 KB) - added by vincentastek 13 years ago.
Output Log

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by vincentastek

Attachment: toto.profile.js added

Profile file

Changed 13 years ago by vincentastek

Attachment: log.txt added

Output Log

comment:1 Changed 13 years ago by vincentastek

More infos :

Sounds like it happens on afdojo.xd.js treatment (dojo.xd.js treatment is ok).

afdojo.xd.js doesn't exist before the build. afdojo is the name I specified as my custom layer in the profile file. It seems like the function searches for a dojo.registerModulePath pattern that doesn't exist.

Am I missing something ?

comment:2 Changed 13 years ago by James Burke

Yeah, there is a bug in the build code. If you change the name to afmojo.js, the build works. I think it has to do with how the code tries to assume a config path based on pathing info.

comment:3 Changed 13 years ago by dante

Milestone: tbdfuture

punting, though recently opened. tdb -> future for 1.3b

comment:4 Changed 10 years ago by ben hockey

Owner: changed from James Burke to vincentastek
Status: newpending

can we close this since in 1.7 we have a completely new build tool?

if there's no response within 14 days this ticket will automatically close.

comment:5 Changed 10 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.