Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

If don't call provide in decl process wait for infinity #53

Open
birhoff opened this issue Mar 3, 2016 · 4 comments
Open

If don't call provide in decl process wait for infinity #53

birhoff opened this issue Mar 3, 2016 · 4 comments

Comments

@birhoff
Copy link

birhoff commented Mar 3, 2016

Main problem is that you don't know that. And all what you can do is check all your code. Maybe you can add some stats method to call when something go wrong.
There is a method:

String getState(String name)

But if you has to many modules you just don't want to check them all.
I see solution in some dependency graph with states.
Minor example:

modules.define(
    'A',
    function(provide, prev) {
        var a = {};
        // do not call provide
        //provide(a);
    });

modules.require(
  ['A'],
  function(a) {
    /* never goes here */
  });
@dfilatov
Copy link
Member

dfilatov commented Mar 3, 2016

modules.getStat() can help you detect what module causes a problem.

@birhoff
Copy link
Author

birhoff commented Mar 3, 2016

Yeah, this is what i wont, maybe add FAQ section where describe this method?

@qfox
Copy link
Contributor

qfox commented Mar 3, 2016

won't or want?

@birhoff
Copy link
Author

birhoff commented Mar 3, 2016

of course want=) sorry for misspell.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants