Commit 2b774017 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4147 from CocoaPods/mr-quick-fix-scoping

[Analyzer] Build scoped pods once for each target definition
parents b91df898 14bddb85
......@@ -14,12 +14,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
* Give a meaningful message for the case where there is no available stable version for a pod,
and user do not explicitly specify the required version.
* Give a meaningful message for the case where there is no available stable
version for a pod, and there is no explicit version requirement.
[Muhammed Yavuz Nuzumlalı](https://github.com/manuyavuz)
[#4197](https://github.com/CocoaPods/CocoaPods/issues/4197)
* Use watchsimulator when validating pods with the watchOS platform.
* Use `watchsimulator` when validating pods with the watchOS platform.
[Thomas Kollbach](https://github.com/toto)
[#4130](https://github.com/CocoaPods/CocoaPods/issues/4130)
......@@ -35,6 +35,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
and includes `use_frameworks!` for Swift projects.
[Jamie Evans](https://github.com/JamieREvans)
* Either generate just one pod target or generate it once for each target
definition.
[Marius Rackwitz](https://github.com/mrackwitz)
[#4034](https://github.com/CocoaPods/CocoaPods/issues/4034)
## 0.39.0.beta.4 (2015-09-02)
##### Bug Fixes
......
......@@ -292,9 +292,9 @@ module Pod
pod_targets = distinct_targets.flat_map do |_, targets_by_distinctors|
if targets_by_distinctors.count > 1
# 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
generate_pod_target(target_definitions, specs, :scoped => true)
generate_pod_target(target_definitions, specs).scoped
end
else
(specs, _), target_definitions = targets_by_distinctors.first
......@@ -317,7 +317,7 @@ module Pod
pod_targets = specs_by_target.flat_map do |target_definition, specs|
grouped_specs = specs.group_by.group_by(&:root).values.uniq
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
pod_targets.each do |target|
......@@ -364,13 +364,10 @@ module Pod
# @param [Array<Specification>] specs
# the specifications of an equal root.
#
# @param [Bool] scoped
# whether the pod target should be scoped
#
# @return [PodTarget]
#
def generate_pod_target(target_definitions, pod_specs, scoped: false)
pod_target = PodTarget.new(pod_specs, target_definitions, sandbox, scoped)
def generate_pod_target(target_definitions, pod_specs)
pod_target = PodTarget.new(pod_specs, target_definitions, sandbox)
if config.integrate_targets?
target_inspections = result.target_inspections.select { |t, _| target_definitions.include?(t) }.values
......
......@@ -196,7 +196,7 @@ module Pod
Pods/Pods-BananaLib
Pods/Pods-monkey
Pods-TestRunner/Pods-TestRunner-BananaLib
Pods-TestRunner/Pods-monkey
Pods-TestRunner/Pods-TestRunner-monkey
Pods-CLITool/Pods-CLITool-monkey
).sort
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