How to solve this basic ES6-module circular dependency problem?

/#!/JoePea joe at trusktr.io
Tue Aug 9 23:00:59 UTC 2016


Hi Jason,

True, and so that's why I'm wondering if the module system can see that it
can satisfy all module requirements if it simply evaluates module C first,
followed by A or B in any order. It is easy for us humans to see that. It
would be nice for the module system to see that as well (I'm not sure if
that is spec'd or not).

- Joe

*/#!/*JoePea

On Tue, Aug 9, 2016 at 2:04 PM, Jason Orendorff <jason.orendorff at gmail.com>
wrote:

> On Tue, Aug 9, 2016 at 3:03 PM, /#!/JoePea <joe at trusktr.io> wrote:
>
>> Why is it that the body of module C is not evaluated before the bodies of
>> modules A and B?
>>
>
> The module system *does* execute all a module's dependencies before
> executing that module, *except* in cases like this where there are cycles
> in the dependency graph and that requirement is therefore impossible to
> satisfy for all modules simultaneously.
>
> -j
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160809/9c9b5d70/attachment.html>


More information about the es-discuss mailing list