summaryrefslogtreecommitdiff
path: root/src/buildstream/_stream.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/_stream.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/_stream.py')
-rw-r--r--src/buildstream/_stream.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index fe641d03c..0df793fea 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -820,7 +820,7 @@ class Stream:
for target in elements:
if not list(target.sources()):
- build_depends = [x.name for x in target.dependencies(Scope.BUILD, recurse=False)]
+ build_depends = [x.name for x in target._dependencies(Scope.BUILD, recurse=False)]
if not build_depends:
raise StreamError("The element {} has no sources".format(target.name))
detail = "Try opening a workspace on one of its dependencies instead:\n"