Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findNestedDependencies stopped working from 2.0.4 to 2.0.5 #253

Closed
dbashford opened this issue Aug 13, 2012 · 2 comments
Closed

findNestedDependencies stopped working from 2.0.4 to 2.0.5 #253

dbashford opened this issue Aug 13, 2012 · 2 comments
Milestone

Comments

@dbashford
Copy link

Broken out of #247

upgrading from .4 to .5 seems to have caused an issue with findNestedDependencies? I'm getting an error out of this bit of Almond for the one nested dependency I have:

    function callDep(name) {
        if (waiting.hasOwnProperty(name)) {
            var args = waiting[name];
            delete waiting[name];
            defining[name] = true;
            main.apply(undef, args);
        }

        if (!defined.hasOwnProperty(name)) {
            throw new Error('No ' + name);   // <==== here
        }
        return defined[name];
    }

This is the easiest way to see this in action:

$ npm install -g mimosa
$ git clone git://github.com/dbashford/AngularFunMimosa.git
$ cd AngularFunMimosa
$ npm install
$ mimosa watch -s -o   (server and optmize)

Open up http://localhost:3000 and you should see the webapp with no console errors. CNTL-C on the mimosa process.

Now...

$ cd /usr/local/lib/node_modules/mimosa/node_modules/requirejs/bin/    (or wherever your global node installs are)
$ rm r.js
$ wget https://raw.github.com/jrburke/r.js/master/dist/r.js

Back in the AngularJS project...

$ mimosa watch -s -o

Reload localhost:3000. Should see a Error: No vendor/domReady on the console.

The require vendor/domReady is in assets/javascripts/bootstrap.coffee, which is compiled to js to public/javascripts/bootstrap.js, which is where it is picked up by the optimizer.

If the mimosa stuff doesn't work for ya, let me know.

@jrburke
Copy link
Member

jrburke commented Aug 14, 2012

Thanks for the test case. It was quite silly, I thought my test suite had a findNestedDependencies test so that it would confirm if I broke anything in the 2.0.5 esprima parse switchover, but I just plain did not have a test for it. So of course there was a bug. So I fixed it, you can try this master version to confirm:

https://raw.github.com/jrburke/r.js/master/dist/r.js

This is bad enough that I will want to do a 2.0.6 release, so I assigned this to that milestone, likely will do the release some time this week.

@dbashford
Copy link
Author

Will check this out in the AM. Excited to hear this means a short turn around on a release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants