diff options
Diffstat (limited to 'buildstream/_loader/loader.py')
-rw-r--r-- | buildstream/_loader/loader.py | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/buildstream/_loader/loader.py b/buildstream/_loader/loader.py index 984ca87f2..1bdbca90f 100644 --- a/buildstream/_loader/loader.py +++ b/buildstream/_loader/loader.py @@ -109,20 +109,19 @@ class Loader(): # deps = [] - for target in targets: - profile_start(Topics.LOAD_PROJECT, target) - junction, name, loader = self._parse_name(target, rewritable, ticker, - fetch_subprojects=fetch_subprojects) - - # XXX This will need to be changed to the context's top-level project if this method - # is ever used for subprojects - top_dir = self.project.directory - - cache_file = YamlCache.get_cache_file(top_dir) - with YamlCache.open(self._context, cache_file) as yaml_cache: + # XXX This will need to be changed to the context's top-level project if this method + # is ever used for subprojects + top_dir = self.project.directory + + cache_file = YamlCache.get_cache_file(top_dir) + with YamlCache.open(self._context, cache_file) as yaml_cache: + for target in targets: + profile_start(Topics.LOAD_PROJECT, target) + junction, name, loader = self._parse_name(target, rewritable, ticker, + fetch_subprojects=fetch_subprojects) loader._load_file(name, rewritable, ticker, fetch_subprojects, yaml_cache) - deps.append(Dependency(name, junction=junction)) - profile_end(Topics.LOAD_PROJECT, target) + deps.append(Dependency(name, junction=junction)) + profile_end(Topics.LOAD_PROJECT, target) # # Now that we've resolve the dependencies, scan them for circular dependencies |