ruby-changes:67412
From: David <ko1@a...>
Date: Tue, 31 Aug 2021 19:06:53 +0900 (JST)
Subject: [ruby-changes:67412] 1b9b41472f (master): [rubygems/rubygems] Completely avoid replacing sources when in multisource compatibility mode
https://git.ruby-lang.org/ruby.git/commit/?id=1b9b41472f From 1b9b41472f0e7b9aac429dc8f95e778a3fce174d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Sat, 24 Jul 2021 18:16:32 +0200 Subject: [rubygems/rubygems] Completely avoid replacing sources when in multisource compatibility mode Since this mode is only enabled in frozen mode, it's fine to use the lockfile and means we don't have to "prepare" the replacement for materialization. https://github.com/rubygems/rubygems/commit/dda01b288e --- lib/bundler/definition.rb | 2 +- lib/bundler/source_list.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 3e357f7..a0a4867 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -721,7 +721,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/definition.rb#L721 @locked_specs.each do |s| # Replace the locked dependency's source with the equivalent source from the Gemfile dep = @dependencies.find {|d| s.satisfies?(d) } - s.source = (dep && dep.source) || sources.get(s.source) + s.source = (dep && dep.source) || sources.get(s.source) unless multisource_allowed? # Don't add a spec to the list if its source is expired. For example, # if you change a Git gem to RubyGems. diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb index 1c0105b..d6310b7 100644 --- a/lib/bundler/source_list.rb +++ b/lib/bundler/source_list.rb @@ -215,7 +215,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/source_list.rb#L215 end def equal_source?(source, other_source) - return source.include?(other_source) if source.is_a?(Source::Rubygems) && other_source.is_a?(Source::Rubygems) && !merged_gem_lockfile_sections? + return source.include?(other_source) if source.is_a?(Source::Rubygems) && other_source.is_a?(Source::Rubygems) source == other_source end -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/