diff options
-rw-r--r-- | .github/PULL_REQUEST_TEMPLATE.md | 21 | ||||
-rw-r--r-- | lib/bundler/gem_version_promoter.rb | 2 | ||||
-rw-r--r-- | lib/bundler/resolver.rb | 7 | ||||
-rw-r--r-- | spec/install/gems/resolving_spec.rb | 14 |
4 files changed, 32 insertions, 12 deletions
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 67dfa5b2c6..a721e8bf0d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,18 +1,19 @@ +<!-- Thanks so much for the contribution! -To make reviewing this PR a bit easier, please fill out answers to the following questions. -### What was the end-user problem that led to this PR? +If you're updating documentation, make sure you run `bin/rake man:build` and +squash the result into your changes, so that all documentation formats are +updated. -The problem was... +To make reviewing this PR a bit easier, please fill out answers to the following questions. +--> -### What was your diagnosis of the problem? +### What was the end-user or developer problem that led to this PR? -My diagnosis was... +<!-- Write a clear and complete description of the problem --> ### What is your fix for the problem, implemented in this PR? -My fix... - -### Why did you choose this fix out of the possible options? - -I chose this fix because... +<!-- Explain the fix being implemented. Include any diagnosis you run to +determine the cause of the issue and your conclusions. If you considered other +alternatives, explain why you end up choosing the current implementation --> diff --git a/lib/bundler/gem_version_promoter.rb b/lib/bundler/gem_version_promoter.rb index 311b0cbbf3..76912940ac 100644 --- a/lib/bundler/gem_version_promoter.rb +++ b/lib/bundler/gem_version_promoter.rb @@ -7,7 +7,7 @@ module Bundler # available dependency versions as found in its index, before returning it to # to the resolution engine to select the best version. class GemVersionPromoter - DEBUG = ENV["DEBUG_RESOLVER"] + DEBUG = ENV["BUNDLER_DEBUG_RESOLVER"] || ENV["DEBUG_RESOLVER"] attr_reader :level, :locked_specs, :unlock_gems diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb index 2374ed3e5a..8b029cc0dc 100644 --- a/lib/bundler/resolver.rb +++ b/lib/bundler/resolver.rb @@ -80,7 +80,12 @@ module Bundler def debug? return @debug_mode if defined?(@debug_mode) - @debug_mode = ENV["DEBUG_RESOLVER"] || ENV["DEBUG_RESOLVER_TREE"] || false + @debug_mode = + ENV["BUNDLER_DEBUG_RESOLVER"] || + ENV["BUNDLER_DEBUG_RESOLVER_TREE"] || + ENV["DEBUG_RESOLVER"] || + ENV["DEBUG_RESOLVER_TREE"] || + false end def before_resolution diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb index d0448ca30b..323b28fdb1 100644 --- a/spec/install/gems/resolving_spec.rb +++ b/spec/install/gems/resolving_spec.rb @@ -69,6 +69,20 @@ RSpec.describe "bundle install with install-time dependencies" do expect(the_bundle).to include_gems "net_a 1.0", "net_b 1.0", "net_c 1.0", "net_d 1.0", "net_e 1.0" end + context "with ENV['BUNDLER_DEBUG_RESOLVER'] set" do + it "produces debug output" do + gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem "net_c" + gem "net_e" + G + + bundle :install, :env => { "BUNDLER_DEBUG_RESOLVER" => "1" } + + expect(err).to include("Creating possibility state for net_c") + end + end + context "with ENV['DEBUG_RESOLVER'] set" do it "produces debug output" do gemfile <<-G |