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
3b2c9f3f
Commit
3b2c9f3f
authored
Mar 07, 2016
by
Muhammed Yavuz Nuzumlali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Resolver] Do not override no spec found message
parent
9888b42b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
resolver.rb
lib/cocoapods/resolver.rb
+24
-8
No files found.
lib/cocoapods/resolver.rb
View file @
3b2c9f3f
...
...
@@ -104,13 +104,7 @@ module Pod
def
search_for
(
dependency
)
@search
||=
{}
@search
[
dependency
]
||=
begin
requirement
=
Requirement
.
new
(
dependency
.
requirement
.
as_list
<<
requirement_for_locked_pod_named
(
dependency
.
name
))
find_cached_set
(
dependency
).
all_specifications
.
select
{
|
s
|
requirement
.
satisfied_by?
s
.
version
}.
map
{
|
s
|
s
.
subspec_by_name
(
dependency
.
name
,
false
)
}.
compact
.
reverse
specifications_for_dependency
(
dependency
,
[
requirement_for_locked_pod_named
(
dependency
.
name
)])
end
@search
[
dependency
].
dup
end
...
...
@@ -279,6 +273,27 @@ module Pod
# @!group Private helpers
# Returns available specifications which satisfy requirements of given dependency
# and additional requirements.
#
# @param [Dependency] dependency
# The dependency whose requirements will be satisfied.
#
# @param [Array<Requirement>] additional_requirements
# List of additional requirements which should also be satisfied.
#
# @return [Array<Specification>] List of specifications satisfying given requirements.
#
def
specifications_for_dependency
(
dependency
,
additional_requirements
=
[])
requirement
=
Requirement
.
new
(
dependency
.
requirement
.
as_list
+
additional_requirements
)
find_cached_set
(
dependency
).
all_specifications
.
select
{
|
s
|
requirement
.
satisfied_by?
s
.
version
}.
map
{
|
s
|
s
.
subspec_by_name
(
dependency
.
name
,
false
)
}.
compact
.
reverse
end
# @return [Set] Loads or returns a previously initialized set for the Pod
# of the given dependency.
#
...
...
@@ -373,6 +388,7 @@ module Pod
error
.
conflicts
.
each
do
|
name
,
conflict
|
local_pod_parent
=
conflict
.
requirement_trees
.
flatten
.
reverse
.
find
(
&
:local?
)
lockfile_reqs
=
conflict
.
requirements
[
name_for_locking_dependency_source
]
if
lockfile_reqs
&&
lockfile_reqs
.
last
&&
lockfile_reqs
.
last
.
prerelease?
&&
!
conflict
.
existing
message
=
'Due to the previous naïve CocoaPods resolver, '
\
"you were using a pre-release version of `
#{
name
}
`, "
\
...
...
@@ -381,7 +397,7 @@ module Pod
'version requirement to your Podfile '
\
"(e.g. `pod '
#{
name
}
', '
#{
lockfile_reqs
.
map
(
&
:requirement
).
join
(
"', '"
)
}
'`) "
\
"or revert to a stable version by running `pod update
#{
name
}
`."
elsif
local_pod_parent
elsif
local_pod_parent
&&
!
specifications_for_dependency
(
conflict
.
requirement
).
empty?
# Conflict was caused by a requirement from a local dependency.
# Tell user to use `pod update`.
message
<<
"
\n\n
It seems like you've changed the constraints of dependency `
#{
name
}
` "
\
...
...
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