Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#5767 closed defect (fixed)

debugAtAllCosts not respecting custom modulePath

Reported by: nathan Owned by: James Burke
Priority: high Milestone: 1.1
Component: General Version: 1.0
Keywords: Cc: alex
Blocked By: Blocking:

Description

I have a custom module path - where mymodule is a peer of my dojo release, for example:

mymodule dojo

-dojo -dijit -dojox

With my script set up like this:

<script src="src/dojo/dojo/dojo.js"

djConfig="parseOnLoad: true, isDebug: true, debugAtAllCosts: true, usePlainJson: true, modulePaths: {mymodule: '../../mymodule}" type="text/javascript"></script>

It appears that the modulePath is not getting applied during debugAtAllCosts...it works if debugAtAllCosts is turned off - but it tries to fetch the file "../mymodule/file.js" instead of "../../mymodule/file.js"

This happens in the latest of SVN and also is happening in 1.0.2.

Change History (6)

comment:1 Changed 12 years ago by James Burke

Milestone: 1.21.1
Owner: changed from anonymous to James Burke

comment:2 Changed 12 years ago by James Burke

Resolution: worksforme
Status: newclosed

I just tried with the latest svn code, r12295, and it seems to work for me. Here is what I did:

  • Updated to latest svn code.
  • Did a build: ./build.sh profile=standard action=release
  • I created a "coolio" directory in the release folder (this mimics the same pathing mentioned above). I created a coolio/actions.js file that defined a coolio.actions.foo() method.
  • I then created a test.html page that existed outside of the "release" directory.
  • Used the following HTML for the test page:
<html>

<head>
<script type="text/javascript" djConfig="parseOnLoad: true, isDebug: true, debugAtAllCosts: true, usePlainJson: true, modulePaths: {coolio: '../../coolio'}" src="release/dojo/dojo/dojo.js"></script>
<script type="text/javascript">
    dojo.require("coolio.actions");
    dojo.addOnLoad(function(){
        coolio.actions.foo();
    });
</script>
</head>
<body>

</body>
</html>

coolio.actions.foo() just calls console.log() with a message. I see the message, and the path to coolio/actions.js to be correct, both when debugAtAllCosts is true and when it is false.

I tested using Firefox 2.0.0.11, and I requested the files from a web server, and I also tested loading the files using a file:// URL. Both worked.

So I'm going to close this bug as unreproducible, but feel free to reopen if you have more information, particularly if you can modify the above process to reproduce, that would be ideal.

comment:3 Changed 12 years ago by guest

Resolution: worksforme
Status: closedreopened

Ah - maybe that's it...

I'm *not* doing a build...just running from the source directory....

I just did the following and got the issue:

  • fresh update of svn (r12295)
  • put coolio directory (and actions.js, as described) as a peer to my svn trunk directory (outside the dojo stuff)
  • used your example file (without doing a build)

I get the error: Could not load 'coolio.actions'; last tried '../coolio/actions.js'

Since debugAtAllCosts is something you do (generally) during development, it probably should be able to be run out of the source tree - not only a release tree.

comment:4 Changed 12 years ago by James Burke

Resolution: fixed
Status: reopenedclosed

(In [12320]) Fixes #5767 (debugAtAllCosts working with dojo svn source) and #2904 (attaching cacheBust parameter inside of dojo._getText -- this allows dijit templates to be updated on reload if you set up djConfig.cacheBust correctly). !strict

comment:5 Changed 12 years ago by nathan

Cc: nathan added; nathan@… removed

comment:6 Changed 12 years ago by nathan

Cc: nathan removed
Reporter: changed from guest to nathan
Note: See TracTickets for help on using tickets.