cram dojo/io/script causes endless loop

32 views
Skip to first unread message

Daniel Haag

unread,
Feb 25, 2013, 2:12:04 AM2/25/13
to cuj...@googlegroups.com
define(function () {

        var config = {
         baseUrl: '',
           paths: {
                       curl: './support/curl/src/curl',
                       "test-js": 'test'
              },
             packages : [
                           {name : 'dojo', location : '../app/js/dojo/dojo', main : 'main'},
              ],
             pluginPath: 'curl/plugin'
      };

        curl(config, ['dojo/io/script']).then(
         function () {
                  setPageState('loaded');
                // this should never get called by cram:
                       curl(['some/other/module']);
           },
             function () {
                  setPageState('failed');
        }
      );


        // do something DOM-ish (this code should never execute during build!)
 function setPageState (stateClass) {
           var root = document.documentElement;
           root.className = root.className.replace(/loading/, '')
                 + ' ' + stateClass;
    }

});

when I require dojo/io/script in my build, it results in an endless loop somewhere.

I am using the cram-dev version with node.js on solaris 10.

If you would like to have a demo project showing the issue please drop me a note.

I changed the tiny-run.js (from cram-dev/test) like this to reproduce the error:

Regards, Daniel

unscriptable

unread,
Feb 25, 2013, 10:33:22 AM2/25/13
to cuj...@googlegroups.com
Is this the latest dojo? (1.8.3?) -- John

Daniel Haag

unread,
Feb 25, 2013, 10:49:50 AM2/25/13
to cuj...@googlegroups.com
I am currently on 1.8.2. I will do a test with 1.8.3 as well.

unscriptable

unread,
Feb 25, 2013, 11:22:23 AM2/25/13
to cuj...@googlegroups.com
I'll download a recent dojo and try to simulate this, too.  -- J

unscriptable

unread,
Feb 25, 2013, 11:23:48 AM2/25/13
to cuj...@googlegroups.com
Since this seems like a bug, I opened an issue for this: https://github.com/cujojs/cram/issues/11


On Monday, February 25, 2013 2:12:04 AM UTC-5, Daniel Haag wrote:

Daniel Haag

unread,
Feb 25, 2013, 12:03:57 PM2/25/13
to cuj...@googlegroups.com

I have the same behaviour in 1.8.3. as well
Reply all
Reply to author
Forward
0 new messages