[前][次][番号順一覧][スレッド一覧]

ruby-changes:74076

From: David <ko1@a...>
Date: Tue, 18 Oct 2022 16:33:36 +0900 (JST)
Subject: [ruby-changes:74076] 0b6f2af3ba (master): [rubygems/rubygems] Avoid unnecessary dependency expansion

https://git.ruby-lang.org/ruby.git/commit/?id=0b6f2af3ba

From 0b6f2af3ba7bda0a81bc1eb1bd5b067c8d9e3e17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Wed, 6 Jul 2022 13:47:11 +0200
Subject: [rubygems/rubygems] Avoid unnecessary dependency expansion

https://github.com/rubygems/rubygems/commit/426748ed06
---
 lib/bundler/definition.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 6bb42ab02c..485d8a1616 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -139,7 +139,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/definition.rb#L139
       if @unlock[:conservative]
         @unlock[:gems] ||= @dependencies.map(&:name)
       else
-        eager_unlock = expand_dependencies(@unlock[:gems] || [], true)
+        eager_unlock = (@unlock[:gems] || []).map {|name| Dependency.new(name, ">= 0") }
         @unlock[:gems] = @locked_specs.for(eager_unlock, false, platforms).map(&:name).uniq
       end
 
@@ -795,7 +795,6 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/definition.rb#L795
     def expand_dependencies(dependencies, remote = false)
       deps = []
       dependencies.each do |dep|
-        dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
         next unless remote || dep.current_platform?
         target_platforms = dep.gem_platforms(remote ? @platforms : [generic_local_platform])
         deps += expand_dependency_with_platforms(dep, target_platforms)
-- 
cgit v1.2.3


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]