From 0085d2aae8c669a597fc4f1a74eff38340d107ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Fri, 2 Nov 2018 08:40:10 +0100 Subject: element.py: Remove unused artifacts parameter from _new_from_meta() --- buildstream/_loader/loader.py | 2 +- buildstream/_project.py | 2 +- buildstream/element.py | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/buildstream/_loader/loader.py b/buildstream/_loader/loader.py index 8a81a71c1..22600b9e9 100644 --- a/buildstream/_loader/loader.py +++ b/buildstream/_loader/loader.py @@ -537,7 +537,7 @@ class Loader(): raise LoadError(LoadErrorReason.INVALID_DATA, "{}: Expected junction but element kind is {}".format(filename, meta_element.kind)) - element = Element._new_from_meta(meta_element, self._context.artifactcache) + element = Element._new_from_meta(meta_element) element._preflight() sources = list(element.sources()) diff --git a/buildstream/_project.py b/buildstream/_project.py index d62077de0..c43510b71 100644 --- a/buildstream/_project.py +++ b/buildstream/_project.py @@ -322,7 +322,7 @@ class Project(): with self._context.timed_activity("Resolving elements"): elements = [ - Element._new_from_meta(meta, artifacts) + Element._new_from_meta(meta) for meta in meta_elements ] diff --git a/buildstream/element.py b/buildstream/element.py index e60daf529..05da2fb4f 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -872,14 +872,13 @@ class Element(Plugin): # and its dependencies from a meta element. # # Args: - # artifacts (ArtifactCache): The artifact cache # meta (MetaElement): The meta element # # Returns: # (Element): A newly created Element instance # @classmethod - def _new_from_meta(cls, meta, artifacts): + def _new_from_meta(cls, meta): if not meta.first_pass: meta.project.ensure_fully_loaded() @@ -904,10 +903,10 @@ class Element(Plugin): # Instantiate dependencies for meta_dep in meta.dependencies: - dependency = Element._new_from_meta(meta_dep, artifacts) + dependency = Element._new_from_meta(meta_dep) element.__runtime_dependencies.append(dependency) for meta_dep in meta.build_dependencies: - dependency = Element._new_from_meta(meta_dep, artifacts) + dependency = Element._new_from_meta(meta_dep) element.__build_dependencies.append(dependency) return element -- cgit v1.2.1