Commit 80809dc0 authored by Fabio Pelosin's avatar Fabio Pelosin

Added resolved depenencies tree to verbose install

parent eae99b2a
...@@ -8,17 +8,20 @@ module Pod ...@@ -8,17 +8,20 @@ module Pod
@sandbox = sandbox @sandbox = sandbox
@cached_sets = {} @cached_sets = {}
@cached_sources = Source::Aggregate.new @cached_sources = Source::Aggregate.new
@log_indent = 1;
end end
def resolve def resolve
@specs = {} @specs = {}
result = @podfile.target_definitions.values.inject({}) do |result, target_definition| result = @podfile.target_definitions.values.inject({}) do |result, target_definition|
puts "\n--> Finding dependencies for #{target_definition.name}" if Config.instance.verbose?
@loaded_specs = [] @loaded_specs = []
find_dependency_sets(@podfile, target_definition.dependencies) find_dependency_sets(@podfile, target_definition.dependencies)
result[target_definition] = @specs.values_at(*@loaded_specs).sort_by(&:name) result[target_definition] = @specs.values_at(*@loaded_specs).sort_by(&:name)
result result
end end
puts
# Specification doesn't need to know more about the context, so we assign # Specification doesn't need to know more about the context, so we assign
# the other specification, of which this pod is a part, to the spec. # the other specification, of which this pod is a part, to the spec.
...@@ -47,7 +50,9 @@ module Pod ...@@ -47,7 +50,9 @@ module Pod
end end
def find_dependency_sets(dependent_specification, dependencies) def find_dependency_sets(dependent_specification, dependencies)
@log_indent += 1
dependencies.each do |dependency| dependencies.each do |dependency|
puts ' ' * @log_indent + "- #{dependency}" if Config.instance.verbose?
set = find_cached_set(dependency) set = find_cached_set(dependency)
set.required_by(dependent_specification) set.required_by(dependent_specification)
# Ensure we don't resolve the same spec twice # Ensure we don't resolve the same spec twice
...@@ -69,6 +74,7 @@ module Pod ...@@ -69,6 +74,7 @@ module Pod
find_dependency_sets(spec, spec.dependencies) find_dependency_sets(spec, spec.dependencies)
end end
end end
@log_indent -= 1
end end
def validate_platform!(spec) def validate_platform!(spec)
......
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