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
46257c2f
Commit
46257c2f
authored
Sep 09, 2015
by
Marius Rackwitz
Committed by
Samuel Giddins
Sep 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Analyzer] Build scoped pods once for each target definition
parent
e3fd4dec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+5
-8
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+1
-1
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
46257c2f
...
@@ -292,9 +292,9 @@ module Pod
...
@@ -292,9 +292,9 @@ module Pod
pod_targets
=
distinct_targets
.
flat_map
do
|
_
,
targets_by_distinctors
|
pod_targets
=
distinct_targets
.
flat_map
do
|
_
,
targets_by_distinctors
|
if
targets_by_distinctors
.
count
>
1
if
targets_by_distinctors
.
count
>
1
# There are different sets of subspecs or the spec is used across different platforms
# 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
specs
,
=
*
distinctor
generate_pod_target
(
target_definitions
,
specs
,
:scoped
=>
true
)
generate_pod_target
(
target_definitions
,
specs
).
scoped
end
end
else
else
(
specs
,
_
),
target_definitions
=
targets_by_distinctors
.
first
(
specs
,
_
),
target_definitions
=
targets_by_distinctors
.
first
...
@@ -317,7 +317,7 @@ module Pod
...
@@ -317,7 +317,7 @@ module Pod
pod_targets
=
specs_by_target
.
flat_map
do
|
target_definition
,
specs
|
pod_targets
=
specs_by_target
.
flat_map
do
|
target_definition
,
specs
|
grouped_specs
=
specs
.
group_by
.
group_by
(
&
:root
).
values
.
uniq
grouped_specs
=
specs
.
group_by
.
group_by
(
&
:root
).
values
.
uniq
grouped_specs
.
flat_map
do
|
pod_specs
|
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
end
end
pod_targets
.
each
do
|
target
|
pod_targets
.
each
do
|
target
|
...
@@ -364,13 +364,10 @@ module Pod
...
@@ -364,13 +364,10 @@ module Pod
# @param [Array<Specification>] specs
# @param [Array<Specification>] specs
# the specifications of an equal root.
# the specifications of an equal root.
#
#
# @param [Bool] scoped
# whether the pod target should be scoped
#
# @return [PodTarget]
# @return [PodTarget]
#
#
def
generate_pod_target
(
target_definitions
,
pod_specs
,
scoped:
false
)
def
generate_pod_target
(
target_definitions
,
pod_specs
)
pod_target
=
PodTarget
.
new
(
pod_specs
,
target_definitions
,
sandbox
,
scoped
)
pod_target
=
PodTarget
.
new
(
pod_specs
,
target_definitions
,
sandbox
)
if
config
.
integrate_targets?
if
config
.
integrate_targets?
target_inspections
=
result
.
target_inspections
.
select
{
|
t
,
_
|
target_definitions
.
include?
(
t
)
}.
values
target_inspections
=
result
.
target_inspections
.
select
{
|
t
,
_
|
target_definitions
.
include?
(
t
)
}.
values
...
...
spec/unit/installer/analyzer_spec.rb
View file @
46257c2f
...
@@ -196,7 +196,7 @@ module Pod
...
@@ -196,7 +196,7 @@ module Pod
Pods/Pods-BananaLib
Pods/Pods-BananaLib
Pods/Pods-monkey
Pods/Pods-monkey
Pods-TestRunner/Pods-TestRunner-BananaLib
Pods-TestRunner/Pods-TestRunner-BananaLib
Pods-TestRunner/Pods-monkey
Pods-TestRunner/Pods-
TestRunner-
monkey
Pods-CLITool/Pods-CLITool-monkey
Pods-CLITool/Pods-CLITool-monkey
)
.
sort
)
.
sort
end
end
...
...
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