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

ruby-changes:70015

From: David <ko1@a...>
Date: Thu, 2 Dec 2021 18:10:48 +0900 (JST)
Subject: [ruby-changes:70015] 39f2b4f1a4 (master): [rubygems/rubygems] This warrants a comment

https://git.ruby-lang.org/ruby.git/commit/?id=39f2b4f1a4

From 39f2b4f1a4a0075c08ce9575a51ccea48c85f024 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Tue, 30 Nov 2021 18:12:54 +0100
Subject: [rubygems/rubygems] This warrants a comment

https://github.com/rubygems/rubygems/commit/8fa29e5e55
---
 lib/bundler/lazy_specification.rb | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index 104225e9ee7..4eb228f3145 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -38,6 +38,20 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/lazy_specification.rb#L38
       identifier.hash
     end
 
+    ##
+    # Does this locked specification satisfy +dependency+?
+    #
+    # NOTE: Rubygems default requirement is ">= 0", which doesn't match
+    # prereleases of 0 versions, like "0.0.0.dev" or "0.0.0.SNAPSHOT". However,
+    # bundler users expect those to work. We need to make sure that Gemfile
+    # dependencies without explicit requirements (which use ">= 0" under the
+    # hood by default) are still valid for locked specs using this kind of
+    # versions. The method implements an ad-hoc fix for that. A better solution
+    # might be to change default rubygems requirement of dependencies to be ">=
+    # 0.A" but that's a major refactoring likely to break things. Hopefully we
+    # can attempt it in the future.
+    #
+
     def satisfies?(dependency)
       effective_requirement = dependency.requirement == Gem::Requirement.default ? Gem::Requirement.new(">= 0.A") : dependency.requirement
 
-- 
cgit v1.2.1


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

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