Unverified Commit 81b66c55 authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by Samuel Giddins

Merge pull request #7600 from paulb777/modular-header-dir

Fix modular header access to header_dirs

(cherry picked from commit 4d95ed04)
parent c2313e93
...@@ -4,6 +4,24 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -4,6 +4,24 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
To install release candidates run `[sudo] gem install cocoapods --pre` To install release candidates run `[sudo] gem install cocoapods --pre`
## 1.5.0 (2018-04-04)
##### Enhancements
* Improve performance of the dependency resolver by removing duplicates for dependency nodes.
[Jacek Suliga](https://github.com/jmkk)
##### Bug Fixes
* Fix modular header access to header_dir's.
[Paul Beusterien](https://github.com/paulb777)
[#7597](https://github.com/CocoaPods/CocoaPods/issues/7597)
* Inhibit warnings for all dependencies during validation except for the one being validated
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7434](https://github.com/CocoaPods/CocoaPods/issues/7434)
## 1.5.0 (2018-04-04) ## 1.5.0 (2018-04-04)
##### Enhancements ##### Enhancements
......
...@@ -624,14 +624,14 @@ module Pod ...@@ -624,14 +624,14 @@ module Pod
# @param [Boolean] only_if_defines_modules # @param [Boolean] only_if_defines_modules
# whether the use of modular headers should require the target to define a module # whether the use of modular headers should require the target to define a module
# #
# @note This must return false when a pod has a `header_mappings_dir`, # @note This must return false when a pod has a `header_mappings_dir` or `header_dir`,
# as that allows the spec to completely customize the header structure, and # as that allows the spec to customize the header structure, and
# therefore it might not be expecting the module name to be prepended # therefore it might not be expecting the module name to be prepended
# to imports at all. # to imports at all.
# #
def uses_modular_headers?(only_if_defines_modules = true) def uses_modular_headers?(only_if_defines_modules = true)
return false if only_if_defines_modules && !defines_module? return false if only_if_defines_modules && !defines_module?
spec_consumers.none?(&:header_mappings_dir) spec_consumers.none?(&:header_mappings_dir) && spec_consumers.none?(&:header_dir)
end end
private private
......
...@@ -327,6 +327,23 @@ module Pod ...@@ -327,6 +327,23 @@ module Pod
] ]
end end
it 'returns header search path including header_dir from dependent' do
@pod_target.build_headers.add_search_path('BananaLib', Platform.ios)
@pod_target.sandbox.public_headers.add_search_path('BananaLib', Platform.ios)
@pod_target.sandbox.public_headers.add_search_path('monkey', Platform.ios)
@monkey_pod_target = fixture_pod_target('monkey/monkey.podspec')
@monkey_pod_target.stubs(:platform).returns(Platform.ios)
@pod_target.stubs(:dependent_targets).returns([@monkey_pod_target])
@file_accessor = @monkey_pod_target.file_accessors.first
@file_accessor.spec_consumer.stubs(:header_dir).returns('Sub_dir')
header_search_paths = @pod_target.header_search_paths
header_search_paths.sort.should == [
'${PODS_ROOT}/Headers/Private/BananaLib',
'${PODS_ROOT}/Headers/Public',
'${PODS_ROOT}/Headers/Public/monkey',
]
end
it 'returns the correct header search paths recursively for dependent targets excluding platform' do it 'returns the correct header search paths recursively for dependent targets excluding platform' do
@pod_target.build_headers.add_search_path('BananaLib', Platform.ios) @pod_target.build_headers.add_search_path('BananaLib', Platform.ios)
@pod_target.sandbox.public_headers.add_search_path('BananaLib', Platform.ios) @pod_target.sandbox.public_headers.add_search_path('BananaLib', Platform.ios)
......
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