summaryrefslogtreecommitdiff
path: root/src/buildstream/_artifact.py
diff options
context:
space:
mode:
authorTristan van Berkom <tristan@codethink.co.uk>2020-08-24 16:53:06 +0900
committerTristan van Berkom <tristan@codethink.co.uk>2020-09-04 18:22:38 +0900
commit97812cbb7d295cc3d270be9205cbc12313215028 (patch)
tree8f5e2ca4303d43b0d4fbc5f36759bb6194da21f0 /src/buildstream/_artifact.py
parent85400d162f1cf29e7f4230b18c0a96ec7e814519 (diff)
downloadbuildstream-97812cbb7d295cc3d270be9205cbc12313215028.tar.gz
Element.dependencies() now yields ElementProxy wrappers by default.
This prepares the ground for policing the dependencies which are visible to an Element plugin, such that plugins are only allowed to see the elements in their Scope.BUILD scope, even if they call Element.dependencies() on a dependency. This commit does the following: * Element.dependencies() is now a user facing frontend which yields ElementProxy elements instead of Elements. * Various core codepaths have been updated to call the internal Element._dependencies() codepath which still returns Elements.
Diffstat (limited to 'src/buildstream/_artifact.py')
-rw-r--r--src/buildstream/_artifact.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/_artifact.py b/src/buildstream/_artifact.py
index f74f3f9ff..1df665c14 100644
--- a/src/buildstream/_artifact.py
+++ b/src/buildstream/_artifact.py
@@ -181,7 +181,7 @@ class Artifact:
size += public_data_digest.size_bytes
# store build dependencies
- for e in element.dependencies(Scope.BUILD):
+ for e in element._dependencies(Scope.BUILD):
new_build = artifact.build_deps.add()
new_build.project_name = e.project_name
new_build.element_name = e.name