Commit e082f3cb authored by arida's avatar arida Committed by Ben Asher
parent fbba429c
...@@ -473,12 +473,7 @@ module Pod ...@@ -473,12 +473,7 @@ module Pod
# dependencies for `target`. # dependencies for `target`.
# #
def valid_dependencies_for_target_from_node(target, dependencies, node) def valid_dependencies_for_target_from_node(target, dependencies, node)
cache_dependency = dependencies[node.name] dependencies[node.name] ||= begin
if cache_dependency
return cache_dependency
end
validate_platform(node.payload, target) validate_platform(node.payload, target)
dependency_nodes = node.outgoing_edges.select do |edge| dependency_nodes = node.outgoing_edges.select do |edge|
edge_is_valid_for_target?(edge, target) edge_is_valid_for_target?(edge, target)
...@@ -487,12 +482,13 @@ module Pod ...@@ -487,12 +482,13 @@ module Pod
dependency_nodes + dependency_nodes.flat_map do |item| dependency_nodes + dependency_nodes.flat_map do |item|
node_result = valid_dependencies_for_target_from_node(target, dependencies, item) node_result = valid_dependencies_for_target_from_node(target, dependencies, item)
dependencies[item.name] = node_result
node_result node_result
end end
end end
dependencies[node.name]
end
# Whether the given `edge` should be followed to find dependencies for the # Whether the given `edge` should be followed to find dependencies for the
# given `target`. # given `target`.
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment