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
808789a5
Commit
808789a5
authored
Apr 09, 2016
by
Eloy Durán
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5136 from CocoaPods/orta-resolvinger
Improve 1.0 error messages around not-found dependencies
parents
7b845e7f
a7cf048e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
10 deletions
+20
-10
CHANGELOG.md
CHANGELOG.md
+5
-0
resolver.rb
lib/cocoapods/resolver.rb
+8
-5
resolver_spec.rb
spec/unit/resolver_spec.rb
+7
-5
No files found.
CHANGELOG.md
View file @
808789a5
...
@@ -13,6 +13,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -13,6 +13,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Samuel Giddins
](
https://github.com/segiddins
)
[
Samuel Giddins
](
https://github.com/segiddins
)
[
CocoaPods#5113
](
https://github.com/CocoaPods/CocoaPods/issues/5113
)
[
CocoaPods#5113
](
https://github.com/CocoaPods/CocoaPods/issues/5113
)
*
Improved error messages, around the 1.0 changes when we cannot find a dependency
in local sources, noting that CP > 1 doesnt run
`pod repo update`
[
Orta Therox
](
https://github.com/orta
)
[
CocoaPods#5135
](
https://github.com/CocoaPods/CocoaPods/issues/5135
)
##### Bug Fixes
##### Bug Fixes
*
None.
*
None.
...
...
lib/cocoapods/resolver.rb
View file @
808789a5
...
@@ -420,11 +420,14 @@ module Pod
...
@@ -420,11 +420,14 @@ module Pod
elsif
!
conflict
.
existing
elsif
!
conflict
.
existing
conflict
.
requirements
.
values
.
flatten
.
each
do
|
r
|
conflict
.
requirements
.
values
.
flatten
.
each
do
|
r
|
if
search_for
(
r
).
empty?
if
search_for
(
r
).
empty?
# There is no existing specification inside any of the spec repos with given requirements.
# There are no existing specification inside any of the spec repos with given requirements.
message
<<
"
\n\n
None of the spec sources contain a spec satisfying the `
#{
r
}
` dependency."
\
message
<<
"
\n\n
None of your spec sources contain a spec satisfying the dependency: `
#{
r
}
`."
\
"
\n
You have either; mistyped the name or version,"
\
"
\n\n
You have either:"
\
' not added the source repo that hosts the Podspec to your Podfile,'
\
"
\n
* out-of-date source repos which you can update with `pod repo update`."
\
' or not got the latest versions of your source repos.'
"
\n
* mistyped the name or version."
\
"
\n
* not added the source repo that hosts the Podspec to your Podfile."
\
"
\n\n
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default."
else
else
message
<<
"
\n\n
Specs satisfying the `
#{
r
}
` dependency were found, "
\
message
<<
"
\n\n
Specs satisfying the `
#{
r
}
` dependency were found, "
\
'but they required a higher minimum deployment target.'
'but they required a higher minimum deployment target.'
...
...
spec/unit/resolver_spec.rb
View file @
808789a5
...
@@ -361,10 +361,12 @@ module Pod
...
@@ -361,10 +361,12 @@ module Pod
e
=
lambda
{
resolver
.
resolve
}.
should
.
raise
Informative
e
=
lambda
{
resolver
.
resolve
}.
should
.
raise
Informative
e
.
message
.
should
.
match
(
/Unable to satisfy the following requirements/
)
e
.
message
.
should
.
match
(
/Unable to satisfy the following requirements/
)
e
.
message
.
should
.
match
(
/`AFNetworking \(= 3.0.1\)` required by `Podfile`/
)
e
.
message
.
should
.
match
(
/`AFNetworking \(= 3.0.1\)` required by `Podfile`/
)
e
.
message
.
should
.
match
(
/None of the spec sources contain a spec satisfying the `AFNetworking \(= 3.0.1\)` dependency./
)
e
.
message
.
should
.
match
(
/None of your spec sources contain a spec satisfying the dependency: `AFNetworking \(= 3.0.1\)`./
)
e
.
message
.
should
.
match
(
/You have either; mistyped the name or version,/
)
e
.
message
.
should
.
match
(
/You have either:/
)
e
.
message
.
should
.
match
(
/ not added the source repo that hosts the Podspec to your Podfile,/
)
e
.
message
.
should
.
match
(
/ * out-of-date source repos which you can update with `pod repo update`/
)
e
.
message
.
should
.
match
(
/ or not got the latest versions of your source repos./
)
e
.
message
.
should
.
match
(
/ * not added the source repo that hosts the Podspec to your Podfile./
)
e
.
message
.
should
.
match
(
/ * out-of-date source repos which you can update with `pod repo update`/
)
e
.
message
.
should
.
match
(
/Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default./
)
end
end
it
'takes into account locked dependencies'
do
it
'takes into account locked dependencies'
do
...
@@ -533,7 +535,7 @@ module Pod
...
@@ -533,7 +535,7 @@ module Pod
sources
=
SourcesManager
.
sources
(
%w(master)
)
sources
=
SourcesManager
.
sources
(
%w(master)
)
resolver
=
Resolver
.
new
(
config
.
sandbox
,
podfile
,
empty_graph
,
sources
)
resolver
=
Resolver
.
new
(
config
.
sandbox
,
podfile
,
empty_graph
,
sources
)
e
=
lambda
{
resolver
.
resolve
}.
should
.
raise
Informative
e
=
lambda
{
resolver
.
resolve
}.
should
.
raise
Informative
e
.
message
.
should
.
match
(
/None of
the spec sources contain a spec satisfying
/
)
e
.
message
.
should
.
match
(
/None of
your spec sources contain a spec
/
)
e
.
message
.
should
.
match
(
/JSONKit/
)
e
.
message
.
should
.
match
(
/JSONKit/
)
e
.
message
.
should
.
match
(
/\= 1.5pre/
)
e
.
message
.
should
.
match
(
/\= 1.5pre/
)
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