1.1 --- a/importer.py Sat Dec 17 00:11:52 2016 +0100
1.2 +++ b/importer.py Sat Dec 17 00:31:59 2016 +0100
1.3 @@ -63,6 +63,10 @@
1.4 self.accessing_modules = {}
1.5 self.invalidated = set()
1.6
1.7 + # Object relationships and dependencies.
1.8 +
1.9 + self.depends = {}
1.10 +
1.11 # Basic program information.
1.12
1.13 self.objects = {}
1.14 @@ -400,7 +404,6 @@
1.15 "Resolve dependencies between modules."
1.16
1.17 self.waiting = {}
1.18 - self.depends = {}
1.19
1.20 for module in self.modules.values():
1.21
1.22 @@ -456,6 +459,14 @@
1.23 if self.verbose:
1.24 print >>sys.stderr, "Requiring", provider, "for", ref, "from", module.name
1.25
1.26 + # Record a module ordering dependency.
1.27 +
1.28 + if not found.static():
1.29 + self.add_dependency(module.name, provider)
1.30 +
1.31 + # Restore the original references so that they may be read back in
1.32 + # and produce the same results.
1.33 +
1.34 module.deferred = original_deferred
1.35
1.36 # Check modules again to see if they are now required and should now
1.37 @@ -528,6 +539,8 @@
1.38 init_item(self.depends, path, set)
1.39 self.depends[path].add(origin)
1.40
1.41 + # NOTE: Consolidate this information in a common location.
1.42 +
1.43 special_attributes = ("__args__", "__file__", "__fn__", "__fname__", "__mname__", "__name__")
1.44
1.45 def is_dynamic_class(self, name):