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

ruby-changes:67442

From: David <ko1@a...>
Date: Tue, 31 Aug 2021 19:07:30 +0900 (JST)
Subject: [ruby-changes:67442] 5aee962fe3 (master): [rubygems/rubygems] Remove `RUBYGEMS_GEMDEPS` warning

https://git.ruby-lang.org/ruby.git/commit/?id=5aee962fe3

From 5aee962fe37a5323e7a844b09f395a440d605872 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Fri, 6 Aug 2021 10:31:45 +0200
Subject: [rubygems/rubygems] Remove `RUBYGEMS_GEMDEPS` warning

When setting the `RUBYGEMS_GEMDEPS` environment variable to allow
skipping `bundle exec`, `bundler` will print a warning about potential
incompatibility.

Initially the `RUBYGEMS_GEMDEPS` variable used a completely different
(re)implementation of `bundler` functionality. That implementation was
not battle tested and could potentially differ in behaviour from what
`bundler` does. That's why print a warning.

However, these days, all `rubygems` does when `RUBYGEMS_GEMDEPS` is set
is to require `bundler/setup`, so there's no risk of any
incompatibility, since that's just plain `bundler`.

https://github.com/rubygems/rubygems/commit/bbddc27016
---
 lib/bundler/cli.rb               |  8 --------
 spec/bundler/bundler/cli_spec.rb | 16 ----------------
 2 files changed, 24 deletions(-)

diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 3ff5f68..a72f0fe 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -73,14 +73,6 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L73
       Bundler.ui = UI::Shell.new(options)
       Bundler.ui.level = "debug" if options["verbose"]
       unprinted_warnings.each {|w| Bundler.ui.warn(w) }
-
-      if ENV["RUBYGEMS_GEMDEPS"] && !ENV["RUBYGEMS_GEMDEPS"].empty?
-        Bundler.ui.warn(
-          "The RUBYGEMS_GEMDEPS environment variable is set. This enables RubyGems' " \
-          "experimental Gemfile mode, which may conflict with Bundler and cause unexpected errors. " \
-          "To remove this warning, unset RUBYGEMS_GEMDEPS.", :wrap => true
-        )
-      end
     end
 
     check_unknown_options!(:except => [:config, :exec])
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb
index c9dd101..c5de12c 100644
--- a/spec/bundler/bundler/cli_spec.rb
+++ b/spec/bundler/bundler/cli_spec.rb
@@ -111,22 +111,6 @@ RSpec.describe "bundle executable" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/cli_spec.rb#L111
     end
   end
 
-  context "when ENV['RUBYGEMS_GEMDEPS'] is set" do
-    it "displays a warning" do
-      gemfile bundled_app_gemfile, <<-G
-        source "#{file_uri_for(gem_repo1)}"
-        gem 'rack'
-      G
-
-      bundle :install, :env => { "RUBYGEMS_GEMDEPS" => "foo" }
-      expect(err).to include("RUBYGEMS_GEMDEPS")
-      expect(err).to include("conflict with Bundler")
-
-      bundle :install, :env => { "RUBYGEMS_GEMDEPS" => "" }
-      expect(err).not_to include("RUBYGEMS_GEMDEPS")
-    end
-  end
-
   context "with --verbose" do
     it "prints the running command" do
       gemfile "source \"#{file_uri_for(gem_repo1)}\""
-- 
cgit v1.1


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

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