mapsapi-modules icon indicating copy to clipboard operation
mapsapi-modules copied to clipboard

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

Open birhoff opened this issue 9 years ago • 4 comments

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 */
  });

birhoff avatar Mar 03 '16 14:03 birhoff

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

dfilatov avatar Mar 03 '16 14:03 dfilatov

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

birhoff avatar Mar 03 '16 15:03 birhoff

won't or want?

qfox avatar Mar 03 '16 17:03 qfox

of course want=) sorry for misspell.

birhoff avatar Mar 03 '16 18:03 birhoff