Commit 46257c2f authored by Marius Rackwitz's avatar Marius Rackwitz Committed by Samuel Giddins

[Analyzer] Build scoped pods once for each target definition

parent e3fd4dec
...@@ -292,9 +292,9 @@ module Pod ...@@ -292,9 +292,9 @@ module Pod
pod_targets = distinct_targets.flat_map do |_, targets_by_distinctors| pod_targets = distinct_targets.flat_map do |_, targets_by_distinctors|
if targets_by_distinctors.count > 1 if targets_by_distinctors.count > 1
# There are different sets of subspecs or the spec is used across different platforms # There are different sets of subspecs or the spec is used across different platforms
targets_by_distinctors.map do |distinctor, target_definitions| targets_by_distinctors.flat_map do |distinctor, target_definitions|
specs, = *distinctor specs, = *distinctor
generate_pod_target(target_definitions, specs, :scoped => true) generate_pod_target(target_definitions, specs).scoped
end end
else else
(specs, _), target_definitions = targets_by_distinctors.first (specs, _), target_definitions = targets_by_distinctors.first
...@@ -317,7 +317,7 @@ module Pod ...@@ -317,7 +317,7 @@ module Pod
pod_targets = specs_by_target.flat_map do |target_definition, specs| pod_targets = specs_by_target.flat_map do |target_definition, specs|
grouped_specs = specs.group_by.group_by(&:root).values.uniq grouped_specs = specs.group_by.group_by(&:root).values.uniq
grouped_specs.flat_map do |pod_specs| grouped_specs.flat_map do |pod_specs|
generate_pod_target([target_definition], pod_specs, :scoped => true) generate_pod_target([target_definition], pod_specs).scoped
end end
end end
pod_targets.each do |target| pod_targets.each do |target|
...@@ -364,13 +364,10 @@ module Pod ...@@ -364,13 +364,10 @@ module Pod
# @param [Array<Specification>] specs # @param [Array<Specification>] specs
# the specifications of an equal root. # the specifications of an equal root.
# #
# @param [Bool] scoped
# whether the pod target should be scoped
#
# @return [PodTarget] # @return [PodTarget]
# #
def generate_pod_target(target_definitions, pod_specs, scoped: false) def generate_pod_target(target_definitions, pod_specs)
pod_target = PodTarget.new(pod_specs, target_definitions, sandbox, scoped) pod_target = PodTarget.new(pod_specs, target_definitions, sandbox)
if config.integrate_targets? if config.integrate_targets?
target_inspections = result.target_inspections.select { |t, _| target_definitions.include?(t) }.values target_inspections = result.target_inspections.select { |t, _| target_definitions.include?(t) }.values
......
...@@ -196,7 +196,7 @@ module Pod ...@@ -196,7 +196,7 @@ module Pod
Pods/Pods-BananaLib Pods/Pods-BananaLib
Pods/Pods-monkey Pods/Pods-monkey
Pods-TestRunner/Pods-TestRunner-BananaLib Pods-TestRunner/Pods-TestRunner-BananaLib
Pods-TestRunner/Pods-monkey Pods-TestRunner/Pods-TestRunner-monkey
Pods-CLITool/Pods-CLITool-monkey Pods-CLITool/Pods-CLITool-monkey
).sort ).sort
end end
......
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