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
acde513e
Commit
acde513e
authored
Oct 09, 2014
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Resolver] Delete dead code
parent
c9a9bd24
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
67 deletions
+1
-67
resolver.rb
lib/cocoapods/resolver.rb
+1
-67
No files found.
lib/cocoapods/resolver.rb
View file @
acde513e
...
@@ -91,7 +91,6 @@ module Pod
...
@@ -91,7 +91,6 @@ module Pod
# definition.
# definition.
#
#
def
resolve
def
resolve
@cached_specs
=
{}
@cached_sets
=
{}
@cached_sets
=
{}
@activated
=
::
Resolver
::
Resolver
.
new
(
self
,
self
).
@activated
=
::
Resolver
::
Resolver
.
new
(
self
,
self
).
resolve
(
resolve
(
...
@@ -208,77 +207,12 @@ module Pod
...
@@ -208,77 +207,12 @@ module Pod
#
#
attr_accessor
:cached_sets
attr_accessor
:cached_sets
# @return [Hash<String => Specification>] The loaded specifications grouped
# by name.
#
attr_accessor
:cached_specs
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
private
private
# @!group Private helpers
# @!group Private helpers
# Resolves recursively the dependencies of a specification and stores them
# in the @cached_specs ivar.
#
# @param [Podfile, Specification, #to_s] dependent_spec
# the specification whose dependencies are being resolved. Used
# only for UI purposes.
#
# @param [Array<Dependency>] dependencies
# the dependencies of the specification.
#
# @param [TargetDefinition] target_definition
# the target definition that owns the specification.
#
# @note If there is a locked dependency with the same name of a
# given dependency the locked one is used in place of the
# dependency of the specification. In this way it is possible to
# prevent the update of the version of installed pods not changed
# in the Podfile.
#
# @note The recursive process checks if a dependency has already been
# loaded to prevent an infinite loop.
#
# @note The set class merges all (of all the target definitions) the
# dependencies and thus it keeps track of whether it is in head
# mode or from an external source because {Dependency#merge}
# preserves this information.
#
# @return [void]
#
def
find_dependency_specs
(
dependent_spec
,
dependencies
,
target_definition
)
dependencies
.
each
do
|
dependency
|
locked_dep
=
locked_dependencies
.
find
{
|
ld
|
ld
.
name
==
dependency
.
name
}
dependency
=
locked_dep
if
locked_dep
UI
.
message
(
"-
#{
dependency
}
"
,
''
,
2
)
do
set
=
find_cached_set
(
dependency
,
dependent_spec
)
set
.
required_by
(
dependency
,
dependent_spec
.
to_s
)
if
(
paths
=
set
.
specification_paths_for_version
(
set
.
required_version
)).
length
>
1
UI
.
warn
"Found multiple specifications for
#{
dependency
}
:
\n
"
\
"-
#{
paths
.
join
(
"
\n
"
)
}
"
end
unless
@loaded_specs
.
include?
(
dependency
.
name
)
spec
=
set
.
specification
.
subspec_by_name
(
dependency
.
name
)
@loaded_specs
<<
spec
.
name
cached_specs
[
spec
.
name
]
=
spec
validate_platform
(
spec
,
target_definition
)
if
dependency
.
head?
||
sandbox
.
head_pod?
(
spec
.
name
)
spec
.
version
.
head
=
true
sandbox
.
store_head_pod
(
spec
.
name
)
end
spec_dependencies
=
spec
.
all_dependencies
(
target_definition
.
platform
)
find_dependency_specs
(
spec
,
spec_dependencies
,
target_definition
)
end
end
end
end
# @return [Set] Loads or returns a previously initialized set for the Pod
# @return [Set] Loads or returns a previously initialized set for the Pod
# of the given dependency.
# of the given dependency.
#
#
...
@@ -291,7 +225,7 @@ module Pod
...
@@ -291,7 +225,7 @@ module Pod
name
=
dependency
.
root_name
name
=
dependency
.
root_name
unless
cached_sets
[
name
]
unless
cached_sets
[
name
]
if
dependency
.
external_source
if
dependency
.
external_source
spec
=
sandbox
.
specification
(
dependency
.
root_
name
)
spec
=
sandbox
.
specification
(
name
)
unless
spec
unless
spec
raise
StandardError
,
'[Bug] Unable to find the specification '
\
raise
StandardError
,
'[Bug] Unable to find the specification '
\
"for `
#{
dependency
}
`."
"for `
#{
dependency
}
`."
...
...
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