Provides a meaningful error message for the dependency conflict occuring when…

Provides a meaningful error message for the dependency conflict occuring when there is no stable version available for a given pod and user do not specify pod version explicitly in Podfile.

While handling resolver error in `handle_resolver_error` method of `resolver.rb` file, we will check if the specificati
on that is not satisfying given requirement was a pre-release version, and if the requirement was including any explicit version or source. If spec is a pre-release version, and there is no explicit version or source for the requirement, we will print a message directing the user to specify pre-release version explicitly.
parent 2c3185a1
......@@ -383,6 +383,11 @@ 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 (conflict.possibility && conflict.possibility.version.prerelease?) && (conflict.requirement && !(conflict.requirement.prerelease? || conflict.requirement.external_source || conflict.requirement.head?))
# Conflict was caused by not specifying an explicit version for the requirement #[name],
# and there is no available stable version for the requirement.
message = "There is no corresponding stable version for `#{name}`. " \
"You should explicitly specify the version in order to install a pre-release version of `#{name}`"
elsif !conflict.existing
conflict.requirements.values.flatten.each do |r|
unless search_for(r).empty?
......
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