mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)
Complete history at: https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L216 * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e548c09d42
commit
4de117a615
153 changed files with 5400 additions and 981 deletions
|
@ -52,11 +52,40 @@ class Gem::Resolver::Conflict
|
|||
|
||||
def explanation
|
||||
activated = @activated.spec.full_name
|
||||
requirement = @failed_dep.dependency.requirement
|
||||
dependency = @failed_dep.dependency
|
||||
requirement = dependency.requirement
|
||||
alternates = dependency.matching_specs.map { |spec| spec.full_name }
|
||||
|
||||
" Activated %s via:\n %s\n instead of (%s) via:\n %s\n" % [
|
||||
activated, request_path(@activated).join(', '),
|
||||
requirement, request_path(requester).join(', '),
|
||||
unless alternates.empty? then
|
||||
matching = <<-MATCHING.chomp
|
||||
|
||||
Gems matching %s:
|
||||
%s
|
||||
MATCHING
|
||||
|
||||
matching = matching % [
|
||||
dependency,
|
||||
alternates.join(', '),
|
||||
]
|
||||
end
|
||||
|
||||
explanation = <<-EXPLANATION
|
||||
Activated %s
|
||||
which does not match conflicting dependency (%s)
|
||||
|
||||
Conflicting dependency chains:
|
||||
%s
|
||||
|
||||
versus:
|
||||
%s
|
||||
%s
|
||||
EXPLANATION
|
||||
|
||||
explanation % [
|
||||
activated, requirement,
|
||||
request_path(@activated).reverse.join(", depends on\n "),
|
||||
request_path(@failed_dep).reverse.join(", depends on\n "),
|
||||
matching,
|
||||
]
|
||||
end
|
||||
|
||||
|
@ -95,10 +124,19 @@ class Gem::Resolver::Conflict
|
|||
path = []
|
||||
|
||||
while current do
|
||||
requirement = current.request.dependency.requirement
|
||||
path << "#{current.spec.full_name} (#{requirement})"
|
||||
case current
|
||||
when Gem::Resolver::ActivationRequest then
|
||||
path <<
|
||||
"#{current.request.dependency}, #{current.spec.version} activated"
|
||||
|
||||
current = current.parent
|
||||
current = current.parent
|
||||
when Gem::Resolver::DependencyRequest then
|
||||
path << "#{current.dependency}"
|
||||
|
||||
current = current.requester
|
||||
else
|
||||
raise Gem::Exception, "[BUG] unknown request class #{current.class}"
|
||||
end
|
||||
end
|
||||
|
||||
path = ['user request (gem command or Gemfile)'] if path.empty?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue