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
fcef7834
Commit
fcef7834
authored
Nov 23, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
break up set intersection. parentheses around Set.new args
parent
7e0ad569
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+5
-4
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
fcef7834
...
@@ -238,17 +238,18 @@ module Pod
...
@@ -238,17 +238,18 @@ module Pod
#
#
def
copy_embedded_target_pod_targets_to_host
(
aggregate_target
,
embedded_aggregate_targets
)
def
copy_embedded_target_pod_targets_to_host
(
aggregate_target
,
embedded_aggregate_targets
)
return
if
aggregate_target
.
requires_host_target?
return
if
aggregate_target
.
requires_host_target?
pod_target_names
=
Set
.
new
aggregate_target
.
pod_targets
.
map
(
&
:name
)
pod_target_names
=
Set
.
new
(
aggregate_target
.
pod_targets
.
map
(
&
:name
)
)
aggregate_user_target_uuids
=
Set
.
new
aggregate_target
.
user_targets
.
map
(
&
:uuid
)
aggregate_user_target_uuids
=
Set
.
new
(
aggregate_target
.
user_targets
.
map
(
&
:uuid
)
)
embedded_aggregate_targets
.
each
do
|
embedded_aggregate_target
|
embedded_aggregate_targets
.
each
do
|
embedded_aggregate_target
|
next
unless
embedded_aggregate_target
.
user_targets
.
any?
do
|
embedded_user_target
|
next
unless
embedded_aggregate_target
.
user_targets
.
any?
do
|
embedded_user_target
|
# You have to ask the host target's project for the host targets of
# You have to ask the host target's project for the host targets of
# the embedded target, as opposed to asking user_project for the
# the embedded target, as opposed to asking user_project for the
# embedded targets of the host target. The latter doesn't work when
# embedded targets of the host target. The latter doesn't work when
# the embedded target lives in a sub-project. The line
below gets
# the embedded target lives in a sub-project. The line
s below get
# the host target uuids for the embedded target and checks to see if
# the host target uuids for the embedded target and checks to see if
# those match to any of the user_target uuids in the aggregate_target.
# those match to any of the user_target uuids in the aggregate_target.
!
aggregate_user_target_uuids
.
intersection
(
Set
.
new
(
aggregate_target
.
user_project
.
host_targets_for_embedded_target
(
embedded_user_target
).
map
(
&
:uuid
))).
empty?
host_target_uuids
=
Set
.
new
(
aggregate_target
.
user_project
.
host_targets_for_embedded_target
(
embedded_user_target
).
map
(
&
:uuid
))
!
aggregate_user_target_uuids
.
intersection
(
host_target_uuids
).
empty?
end
end
# This embedded target is hosted by the aggregate target's user_target; copy over the non-duplicate pod_targets
# This embedded target is hosted by the aggregate target's user_target; copy over the non-duplicate pod_targets
aggregate_target
.
pod_targets
=
aggregate_target
.
pod_targets
+
embedded_aggregate_target
.
pod_targets
.
select
do
|
pod_target
|
aggregate_target
.
pod_targets
=
aggregate_target
.
pod_targets
+
embedded_aggregate_target
.
pod_targets
.
select
do
|
pod_target
|
...
...
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