whatwg / loader

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

Dependency Loading Bug #25

Closed guybedford closed 9 years ago

guybedford commented 9 years ago

Currently in 4.2.4 RequestLink it calls requestInstantiate on all dependencies. This in turn will fulfill when all the dependencies have been driven to the LINK state. But just because the dependencies are in the link state does not mean that their dependencies in turn are. Thus third-level dependencies can be skipped out.

Let me know if that describes the issue in enough detail.

dherman commented 9 years ago

@guybedford Can you take a look at commit 3dd0c66c34aa20c7454283a53482280aa5a3bef5 and see if that looks right to you?

guybedford commented 9 years ago

@dherman this looks great to me on first read. Will work on updating this implementation next week with some luck.

caridy commented 9 years ago

@guybedford are we good here? if yes, let's close this issue.

guybedford commented 9 years ago

@caridy thanks for following up. Yes this is still a bug unfortunately, see the last point in https://github.com/whatwg/loader/issues/40, which is a critical bug wrt to circular references:

4.2.4 Circular references still don't have a stop condition here. Some type of extra state is needed, perhaps an INSTANTIATE_ALL that fits in after instantiate, which then gets marked as LINK within instantiateAll before hitting the circular references.

caridy commented 9 years ago

ok, we will track the circular references issue here: https://github.com/whatwg/loader/issues/40