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
803fab5b
Commit
803fab5b
authored
Jun 02, 2016
by
Juan Pablo Civile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PodTarget] Make #recursive_dependent_targets handle cyclic dependencies
Fixes #5362
parent
a3241de2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
3 deletions
+41
-3
CHANGELOG.md
CHANGELOG.md
+4
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+8
-2
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
integration.rb
spec/integration.rb
+5
-0
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+23
-0
No files found.
CHANGELOG.md
View file @
803fab5b
...
...
@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Boris Bügling
](
https://github.com/neonichu
)
[
#5445
](
https://github.com/CocoaPods/CocoaPods/issues/5445
)
*
Resolve cyclic dependencies when creating pod targets.
[
Juan Civile
](
https://github.com/champo
)
[
#5362
](
https://github.com/CocoaPods/CocoaPods/issues/5362
)
## 1.0.1 (2016-06-02)
...
...
lib/cocoapods/target/pod_target.rb
View file @
803fab5b
...
...
@@ -189,8 +189,14 @@ module Pod
# dependency upon.
#
def
recursive_dependent_targets
targets
=
dependent_targets
+
dependent_targets
.
flat_map
(
&
:recursive_dependent_targets
)
targets
.
uniq!
targets
=
dependent_targets
.
clone
targets
.
each
do
|
target
|
target
.
dependent_targets
.
each
do
|
t
|
targets
.
push
(
t
)
unless
t
==
self
||
targets
.
include?
(
t
)
end
end
targets
end
...
...
cocoapods-integration-specs
@
409958a7
Subproject commit 4
c7f2413a2cf1a8175c544555d000bfb6511e943
Subproject commit 4
09958a75378ff70582af2fbabb1441c551ed1c7
spec/integration.rb
View file @
803fab5b
...
...
@@ -294,6 +294,11 @@ describe_cli 'pod' do
behaves_like
cli_spec
'install_search_paths_inheritance'
,
'install --no-repo-update'
end
describe
'Integrates a Pod with circular subspec dependencies'
do
behaves_like
cli_spec
'install_circular_subspec_dependency'
,
'install --no-repo-update'
end
end
#--------------------------------------#
...
...
spec/unit/target/pod_target_spec.rb
View file @
803fab5b
...
...
@@ -281,6 +281,29 @@ module Pod
@pod_target
.
requires_frameworks?
.
should
==
true
end
end
describe
'With dependencies'
do
before
do
@pod_dependency
=
fixture_pod_target
(
'orange-framework/OrangeFramework.podspec'
)
@pod_target
.
dependent_targets
=
[
@pod_dependency
]
end
it
'resolves simple dependencies'
do
@pod_target
.
recursive_dependent_targets
.
should
==
[
@pod_dependency
]
end
describe
'With cyclic dependencies'
do
before
do
@pod_dependency
=
fixture_pod_target
(
'orange-framework/OrangeFramework.podspec'
)
@pod_dependency
.
dependent_targets
=
[
@pod_target
]
@pod_target
.
dependent_targets
=
[
@pod_dependency
]
end
it
'resolves the cycle'
do
@pod_target
.
recursive_dependent_targets
.
should
==
[
@pod_dependency
]
end
end
end
end
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