Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Add support for BUNDLER_ prefixed debug environment variables #7589

Merged
1 commit merged into from
Jan 19, 2020

Conversation

kou
Copy link
Contributor

@kou kou commented Jan 18, 2020

DEBUG_RESOLVER is used in RubyGems too. So we can't enable it only for
Bundler.

What was the end-user problem that led to this PR?

The problem was not the end-user problem. It's a developer problem.

What was your diagnosis of the problem?

My diagnosis was RubyGems also uses DEBUG_RESOLVER environment variable. So we can't use DEBUG_RESOLVER environment variable to enable debug mode only for Bundler. We can use DEBUG_RESOLVER_TREE instead of DEBUG_RESOLVER only for Bundler::Resolver. But we can't do it for Bundler::GemVersionPromoter.

What is your fix for the problem, implemented in this PR?

My fix adds BUNDLER_ prefix to DEBUG_RESOLVER and DEBUG_RESOLVER_TREE like other environment variables for Bundler such as BUNDLER_EDITOR do.

Why did you choose this fix out of the possible options?

I chose this fix because adding prefix is a common way. Bundlerd Molinillo and Thor also use this way such as MOLINILLO_DEBUG and THOR_SHELL.

DEBUG_RESOLVER is used in RubyGems too. So we can't enable it only for
Bundler.
@deivid-rodriguez
Copy link
Member

Thanks! 😍

@bundlerbot r=colby-swandale

ghost pushed a commit that referenced this pull request Jan 19, 2020
7589: Add support for BUNDLER_ prefixed debug environment variables r=colby-swandale a=kou

DEBUG_RESOLVER is used in RubyGems too. So we can't enable it only for
Bundler.

### What was the end-user problem that led to this PR?

The problem was not the end-user problem. It's a developer problem.

### What was your diagnosis of the problem?

My diagnosis was RubyGems also uses `DEBUG_RESOLVER` environment variable. So we can't use `DEBUG_RESOLVER` environment variable to enable debug mode only for Bundler. We can use `DEBUG_RESOLVER_TREE` instead of `DEBUG_RESOLVER` only for `Bundler::Resolver`. But we can't do it for `Bundler::GemVersionPromoter`.

### What is your fix for the problem, implemented in this PR?

My fix adds `BUNDLER_` prefix to `DEBUG_RESOLVER` and `DEBUG_RESOLVER_TREE` like other environment variables for Bundler such as `BUNDLER_EDITOR` do.

### Why did you choose this fix out of the possible options?

I chose this fix because adding prefix is a common way. Bundlerd Molinillo and Thor also use this way such as `MOLINILLO_DEBUG` and `THOR_SHELL`.


Co-authored-by: Sutou Kouhei <kou@clear-code.com>
@ghost
Copy link

ghost commented Jan 19, 2020

Build succeeded

@ghost ghost merged commit 5100744 into rubygems:master Jan 19, 2020
@kou kou deleted the resolver-debug-env branch January 19, 2020 20:28
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants