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
720a5267
Commit
720a5267
authored
Oct 09, 2014
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Resolver] Verify platform compatability
parent
54b0c132
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
resolver.rb
lib/cocoapods/resolver.rb
+14
-4
No files found.
lib/cocoapods/resolver.rb
View file @
720a5267
...
...
@@ -14,7 +14,6 @@ module Resolver
end
module
Pod
class
Specification
::
Set
class
LazySpecification
<
BasicObject
attr_reader
:name
,
:version
,
:source
...
...
@@ -109,7 +108,7 @@ module Pod
def
resolve
@cached_specs
=
{}
@cached_sets
=
{}
@activated
=
::
Resolver
::
Resolver
.
new
(
self
,
self
).
@activated
=
::
Resolver
::
Resolver
.
new
(
self
,
self
).
resolve
(
@podfile
.
target_definition_list
.
map
(
&
:dependencies
).
flatten
,
locked_dependencies
.
reduce
(
::
Resolver
::
DependencyGraph
.
new
)
do
|
graph
,
locked
|
...
...
@@ -189,8 +188,19 @@ module Pod
specs_by_target
[
target
]
=
target
.
dependencies
.
map
(
&
:name
).
map
do
|
name
|
node
=
@activated
.
vertex_named
(
name
)
(
node
.
recursive_successors
<<
node
).
to_a
end
.
flatten
.
map
(
&
:payload
).
uniq
.
sort
{
|
x
,
y
|
x
.
name
<=>
y
.
name
}.
each
{
|
s
|
sandbox
.
store_head_pod
(
s
.
name
)
if
s
.
version
.
head
}
end
.
flatten
.
map
(
&
:payload
).
uniq
.
sort
{
|
x
,
y
|
x
.
name
<=>
y
.
name
}.
each
do
|
spec
|
unless
spec
.
available_platforms
.
any?
{
|
p
|
target
.
platform
.
supports?
(
p
)
}
raise
Informative
,
"The platform of the target `
#{
target
.
name
}
` "
\
"(
#{
target
.
platform
}
) is not compatible with `
#{
spec
}
` which has "
\
"a minimum requirement of
#{
spec
.
available_platforms
.
join
(
' - '
)
}
."
end
sandbox
.
store_head_pod
(
spec
.
name
)
if
spec
.
version
.
head
end
end
specs_by_target
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