Hi,
On Thu, 2020-08-06 at 16:50 +0900, Tristan Van Berkom wrote:
> Hi,
>
> On Wed, 2020-08-05 at 17:00 +0200, Jürg Billeter wrote:
> > An element should still be able to iterate over the runtime
> > dependencies of a build dependency, though. We need to be careful not
> > to restrict `Element.dependencies()` too much.
>
> This is what we currently call `Scope.BUILD`, the build scope includes
> runtime dependencies of build dependencies.
Yes, for `self.dependencies()` `Scope.BUILD` should definitely be fine.
However, I was wondering whether we still need to support something
like the following:
for build_dep in self.dependencies(Scope.BUILD, recurse=False):
indirect_deps = build_dep.dependencies(Scope.RUN)
# Do something with build_dep and indirect_deps
`ScriptElement` currently uses this to call `integrate()` on the
indirect runtime dependencies for build dependencies that are staged at
the root of the sandbox.
Instead of the above loop, the plugin may also use the new proposed
method to get the direct build dependencies (with configuration), of
course.
Cheers,
Jürg