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
93e847fd
Commit
93e847fd
authored
Sep 27, 2016
by
Danielle Tomlinson
Committed by
GitHub
Sep 27, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5934 from dnkoutso/master
Cache result of include_in_build_config and inhibit_warnings
parents
9ea34717
e833c8c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
CHANGELOG.md
CHANGELOG.md
+4
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+11
-0
No files found.
CHANGELOG.md
View file @
93e847fd
...
@@ -8,6 +8,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -8,6 +8,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements
##### Enhancements
*
Cache result of inhibit_warnings and include_in_build_config to speed up pod install.
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#5934
](
https://github.com/CocoaPods/CocoaPods/pull/5934
)
*
Improve performance of PathList.read_file_system
*
Improve performance of PathList.read_file_system
[
Heath Borders
](
https://github.com/hborders
)
[
Heath Borders
](
https://github.com/hborders
)
[
#5890
](
https://github.com/CocoaPods/CocoaPods/issues/5890
)
[
#5890
](
https://github.com/CocoaPods/CocoaPods/issues/5890
)
...
...
lib/cocoapods/target/pod_target.rb
View file @
93e847fd
...
@@ -47,6 +47,7 @@ module Pod
...
@@ -47,6 +47,7 @@ module Pod
@file_accessors
=
[]
@file_accessors
=
[]
@resource_bundle_targets
=
[]
@resource_bundle_targets
=
[]
@dependent_targets
=
[]
@dependent_targets
=
[]
@build_config_cache
=
{}
end
end
# @param [Hash{Array => PodTarget}] cache
# @param [Hash{Array => PodTarget}] cache
...
@@ -222,13 +223,20 @@ module Pod
...
@@ -222,13 +223,20 @@ module Pod
# The name of the build configuration.
# The name of the build configuration.
#
#
def
include_in_build_config?
(
target_definition
,
configuration_name
)
def
include_in_build_config?
(
target_definition
,
configuration_name
)
key
=
[
target_definition
.
label
,
configuration_name
]
if
@build_config_cache
.
key?
(
key
)
return
@build_config_cache
[
key
]
end
whitelists
=
target_definition_dependencies
(
target_definition
).
map
do
|
dependency
|
whitelists
=
target_definition_dependencies
(
target_definition
).
map
do
|
dependency
|
target_definition
.
pod_whitelisted_for_configuration?
(
dependency
.
name
,
configuration_name
)
target_definition
.
pod_whitelisted_for_configuration?
(
dependency
.
name
,
configuration_name
)
end
.
uniq
end
.
uniq
if
whitelists
.
empty?
if
whitelists
.
empty?
@build_config_cache
[
key
]
=
true
return
true
return
true
elsif
whitelists
.
count
==
1
elsif
whitelists
.
count
==
1
@build_config_cache
[
key
]
=
whitelists
.
first
whitelists
.
first
whitelists
.
first
else
else
raise
Informative
,
"The subspecs of `
#{
pod_name
}
` are linked to "
\
raise
Informative
,
"The subspecs of `
#{
pod_name
}
` are linked to "
\
...
@@ -243,13 +251,16 @@ module Pod
...
@@ -243,13 +251,16 @@ module Pod
# @return [Bool]
# @return [Bool]
#
#
def
inhibit_warnings?
def
inhibit_warnings?
return
@inhibit_warnings
if
defined?
@inhibit_warnings
whitelists
=
target_definitions
.
map
do
|
target_definition
|
whitelists
=
target_definitions
.
map
do
|
target_definition
|
target_definition
.
inhibits_warnings_for_pod?
(
root_spec
.
name
)
target_definition
.
inhibits_warnings_for_pod?
(
root_spec
.
name
)
end
.
uniq
end
.
uniq
if
whitelists
.
empty?
if
whitelists
.
empty?
@inhibit_warnings
=
false
return
false
return
false
elsif
whitelists
.
count
==
1
elsif
whitelists
.
count
==
1
@inhibit_warnings
=
whitelists
.
first
whitelists
.
first
whitelists
.
first
else
else
UI
.
warn
"The pod `
#{
pod_name
}
` is linked to different targets "
\
UI
.
warn
"The pod `
#{
pod_name
}
` is linked to different targets "
\
...
...
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