Without a way to load "later" (aka "soft") dependencies, ES6 module will continue to be more or less broken for circular dependencies.
On Tue, Aug 9, 2016 at 4:11 PM, Tab Atkins Jr. <[email protected]> wrote: > On Tue, Aug 9, 2016 at 4:00 PM, /#!/JoePea <[email protected]> wrote: > > 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). > > That knowledge requires, at minimum, evaluating the rest of each > module, beyond what is expressed in the `import` statements. That's > assuming there's no dynamic trickery going on that would invalidate > whatever assumptions it can draw from surface-level analysis. > > Because of this, only the `import` statements are declaratively > available to the module system to work with. Based on that, it > definitely can't make any ordering assumptions; all it knows is that A > imports C, B imports C, and C imports both A and B, making a circular > import. > > ~TJ > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

