Commit 17fcb6d3 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4443 from manuyavuz/fix/resolverMessaging

Improve message when there is no spec in repos for a given dependency
parents 6d2604cc 7ff33334
...@@ -8,6 +8,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -8,6 +8,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements ##### Enhancements
* Improve message when there is no spec in repos for dependency set in Podfile.
[Muhammed Yavuz Nuzumlalı](https://github.com/manuyavuz)
[#4430](https://github.com/CocoaPods/CocoaPods/issues/4430)
* Reduce the number of times the user's Xcode project is opened, speeding up * Reduce the number of times the user's Xcode project is opened, speeding up
installation. installation.
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
......
...@@ -400,7 +400,13 @@ module Pod ...@@ -400,7 +400,13 @@ module Pod
message << "\nYou should explicitly specify the version in order to install a pre-release version" message << "\nYou should explicitly specify the version in order to install a pre-release version"
elsif !conflict.existing elsif !conflict.existing
conflict.requirements.values.flatten.each do |r| conflict.requirements.values.flatten.each do |r|
unless search_for(r).empty? if search_for(r).empty?
# There is no existing specification inside any of the spec repos with given requirements.
message << "\n\nNone of the spec sources contain a spec satisfying the `#{r}` dependency." \
"\nYou have either; mistyped the name or version," \
' not added the source repo that hosts the Podspec to your Podfile,' \
' or not got the latest versions of your source repos.'
else
message << "\n\nSpecs satisfying the `#{r}` dependency were found, " \ message << "\n\nSpecs satisfying the `#{r}` dependency were found, " \
'but they required a higher minimum deployment target.' 'but they required a higher minimum deployment target.'
end end
......
...@@ -405,6 +405,10 @@ module Pod ...@@ -405,6 +405,10 @@ 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(/You have either; mistyped the name or version,/)
e.message.should.match(/ not added the source repo that hosts the Podspec to your Podfile,/)
e.message.should.match(/ or not got the latest versions of your source repos./)
end end
it 'takes into account locked dependencies' do it 'takes into account locked dependencies' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment