lib/build/dependency_node.rb in build-2.5.1 vs lib/build/dependency_node.rb in build-2.5.2
- old
+ new
@@ -82,10 +82,24 @@
end
def dependency_node_for(dependency)
DependencyNode.new(@chain, dependency, @environment, @arguments)
end
+
+ def print_dependencies(buffer = $stderr, level = 0)
+ self.provisions.each do |provision|
+ buffer.puts "#{" " * indentation}building #{provision.provider.name} which #{provision} which depends on:"
+
+ provision.each_dependency do |nested_dependency|
+ child = self.dependency_node_for(nested_dependency)
+
+ child.print_dependencies(buffer, level + 1)
+ end
+ end
+
+ return nil
+ end
end
class DependencyTask < Task
def initialize(*arguments, **options)
super
@@ -139,15 +153,15 @@
# environments.each do |environment|
# logger.debug {"Using #{environment}"}
# end
- local_environment = Build::Environment.combine(*environments)&.evaluate || Build::Environment.new
+ local_environment = Build::Environment.combine(*environments)&.evaluate(name: dependency.name) || Build::Environment.new(name: dependency.name)
# logger.debug("Local Environment: #{local_environment}")
build_task = invoke(
- BuildNode.new(local_environment, dependency, @node.provisions, @node.arguments)
+ BuildNode.new(local_environment, @node.provisions, @node.arguments)
)
if wait_for_children?
output_environment = build_task.output_environment
public_environments << output_environment.dup(parent: nil, name: dependency.name)