whatwg / loader

Loader Standard
https://whatwg.github.io/loader/
Creative Commons Zero v1.0 Universal
607 stars 45 forks source link

6.7.1.2. Reflective Module.ResolveExport() - Review SyntaxError on circular dependencies #55

Closed caridy closed 9 years ago

caridy commented 9 years ago

Reported by @bmeck (https://github.com/WebAssembly/design/issues/256#issuecomment-120558466)

guybedford commented 9 years ago

I believe this refers to circular references in the bindings setup. The point is I can't do:

a.js

export {a} from './b.js';

b.js

export {a} from './a.js';

So we stop circularity of bindings, not circularity of modules.

dherman commented 9 years ago

@guybedford is right: this part of the semantics treats re-export cycles as a static error, not cyclic module dependencies. Re-export cycles are nonsense: in the example above, a is not actually defined anywhere.