Commit 417503d9 authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #7068 from dnkoutso/fix_caching

Fix framework and resources paths caching
parents eb900a78 98260a5c
...@@ -14,6 +14,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -14,6 +14,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### Bug Fixes
* Fix framework and resources paths caching
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7068](https://github.com/CocoaPods/CocoaPods/pull/7068)
* Build subspecs in static frameworks without error * Build subspecs in static frameworks without error
[Paul Beusterien](https://github.com/paulb777) [Paul Beusterien](https://github.com/paulb777)
[#7058](https://github.com/CocoaPods/CocoaPods/pull/7058) [#7058](https://github.com/CocoaPods/CocoaPods/pull/7058)
......
...@@ -207,8 +207,9 @@ module Pod ...@@ -207,8 +207,9 @@ module Pod
# this target depends upon. # this target depends upon.
# #
def framework_paths(include_test_spec_paths = true) def framework_paths(include_test_spec_paths = true)
@framework_paths ||= Hash.new do |h, key| @framework_paths ||= {}
h[key] = begin return @framework_paths[include_test_spec_paths] if @framework_paths.key?(include_test_spec_paths)
@framework_paths[include_test_spec_paths] = begin
accessors = file_accessors accessors = file_accessors
accessors = accessors.reject { |a| a.spec.test_specification? } unless include_test_spec_paths accessors = accessors.reject { |a| a.spec.test_specification? } unless include_test_spec_paths
frameworks = [] frameworks = []
...@@ -236,8 +237,6 @@ module Pod ...@@ -236,8 +237,6 @@ module Pod
frameworks frameworks
end end
end end
@framework_paths[include_test_spec_paths]
end
# Returns the resource paths associated with this target. By default all paths include the resource paths # Returns the resource paths associated with this target. By default all paths include the resource paths
# that are part of test specifications. # that are part of test specifications.
...@@ -248,8 +247,9 @@ module Pod ...@@ -248,8 +247,9 @@ module Pod
# @return [Array<String>] The resource and resource bundle paths this target depends upon. # @return [Array<String>] The resource and resource bundle paths this target depends upon.
# #
def resource_paths(include_test_spec_paths = true) def resource_paths(include_test_spec_paths = true)
@resource_paths ||= Hash.new do |h, key| @resource_paths ||= {}
h[key] = begin return @resource_paths[include_test_spec_paths] if @resource_paths.key?(include_test_spec_paths)
@resource_paths[include_test_spec_paths] = begin
accessors = file_accessors accessors = file_accessors
accessors = accessors.reject { |a| a.spec.test_specification? } unless include_test_spec_paths accessors = accessors.reject { |a| a.spec.test_specification? } unless include_test_spec_paths
resource_paths = accessors.flat_map do |accessor| resource_paths = accessors.flat_map do |accessor|
...@@ -263,8 +263,6 @@ module Pod ...@@ -263,8 +263,6 @@ module Pod
resource_paths + resource_bundles resource_paths + resource_bundles
end end
end end
@resource_paths[include_test_spec_paths]
end
# Returns the corresponding native target to use based on the provided specification. # Returns the corresponding native target to use based on the provided specification.
# This is used to figure out whether to add a source file into the library native target or any of the # This is used to figure out whether to add a source file into the library native target or any of the
......
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