summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-11-03 11:01:24 +0100
committerJürg Billeter <j@bitron.ch>2018-11-05 17:18:12 +0000
commitbfb639bfc1a768cb7e8208d3650d3461e6da7ec4 (patch)
treebc9168047be5483e8489b4e39638b50a4cedd0f4 /buildstream
parentbe8f0a54764e8190efdf9361f3ca3f7a44dea0e3 (diff)
downloadbuildstream-bfb639bfc1a768cb7e8208d3650d3461e6da7ec4.tar.gz
element.py: Remove artifacts parameter from constructor
Get the artifact cache from the context instead.
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/_elementfactory.py2
-rw-r--r--buildstream/element.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/_elementfactory.py b/buildstream/_elementfactory.py
index 00847e66f..282648a6e 100644
--- a/buildstream/_elementfactory.py
+++ b/buildstream/_elementfactory.py
@@ -58,7 +58,7 @@ class ElementFactory(PluginContext):
#
def create(self, context, project, artifacts, meta):
element_type, default_config = self.lookup(meta.kind)
- element = element_type(context, project, artifacts, meta, default_config)
+ element = element_type(context, project, meta, default_config)
version = self._format_versions.get(meta.kind, 0)
self._assert_plugin_format(element, version)
return element
diff --git a/buildstream/element.py b/buildstream/element.py
index 5de0253c5..3e4aea6b4 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -174,7 +174,7 @@ class Element(Plugin):
*Since: 1.4*
"""
- def __init__(self, context, project, artifacts, meta, plugin_conf):
+ def __init__(self, context, project, meta, plugin_conf):
self.__cache_key_dict = None # Dict for cache key calculation
self.__cache_key = None # Our cached cache key
@@ -199,7 +199,7 @@ class Element(Plugin):
self.__sources = [] # List of Sources
self.__weak_cache_key = None # Our cached weak cache key
self.__strict_cache_key = None # Our cached cache key for strict builds
- self.__artifacts = artifacts # Artifact cache
+ self.__artifacts = context.artifactcache # Artifact cache
self.__consistency = Consistency.INCONSISTENT # Cached overall consistency state
self.__strong_cached = None # Whether we have a cached artifact
self.__weak_cached = None # Whether we have a cached artifact