Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
4d95ed04
Unverified
Commit
4d95ed04
authored
Apr 09, 2018
by
Dimitris Koutsogiorgas
Committed by
GitHub
Apr 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7600 from paulb777/modular-header-dir
Fix modular header access to header_dirs
parents
15c4baed
68b1552f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
CHANGELOG.md
CHANGELOG.md
+4
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+3
-3
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+17
-0
No files found.
CHANGELOG.md
View file @
4d95ed04
...
...
@@ -13,6 +13,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### 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
)
...
...
lib/cocoapods/target/pod_target.rb
View file @
4d95ed04
...
...
@@ -612,14 +612,14 @@ module Pod
# @param [Boolean] only_if_defines_modules
# 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`,
# as that allows the spec to c
ompletely c
ustomize the header structure, and
# @note This must return false when a pod has a `header_mappings_dir`
or `header_dir`
,
# as that allows the spec to customize the header structure, and
# therefore it might not be expecting the module name to be prepended
# to imports at all.
#
def
uses_modular_headers?
(
only_if_defines_modules
=
true
)
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
private
...
...
spec/unit/target/pod_target_spec.rb
View file @
4d95ed04
...
...
@@ -326,6 +326,23 @@ module Pod
]
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
@pod_target
.
build_headers
.
add_search_path
(
'BananaLib'
,
Platform
.
ios
)
@pod_target
.
sandbox
.
public_headers
.
add_search_path
(
'BananaLib'
,
Platform
.
ios
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment