Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore change to copy global with/without config locally upon bundle install #4154

Merged
merged 5 commits into from
Dec 16, 2020

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Dec 15, 2020

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

Turns out #3666, which I thought was a bug fix, broke things for some people.

The problem is that people are righteously assuming that bundle config should save configuration locally to the application, but currently it doesn't work like that.

This "feature" of bundle install automatically copying global with and without configuration to the local configuration was creating the false impression that bundle config worked as you would expect and keeping people's expectations working.

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

I considered just making the switch and changing bundle config to be local but a few examples come up that could break because of doing that, so for the time being I'm just going to revert the change and release a patch release with the revert.

Fixes #4142.

Make sure the following tasks are checked

This reverts commit 0598cbb, but keeps
the same spec, but "inverted" to clarify that doing this was a feature,
not a bug.

This behavior is not present on bundler 3 though, because it won't
remember CLI options, and what the current code does is to fake `--with`
and `--without` where given as CLI options if they are configured
globally.  We don't want to preserve this behaviour on the next major
version, so the same spec that was present on master (setting are not
automagically saved from global to local config) is kept on bundler 3.

In addition to that, I'm adding another spec representing the realworld
behavior that was broken for people when I introduced
0598cbb.

Note that this spec does not currently pass on bundler 3 (again, because
bundler 3 does not remember CLI options automatically), but I plan to
fix that by changing `bundle config` default to save configuration
locally to the application, not globally.
@deivid-rodriguez deivid-rodriguez force-pushed the revert_change_to_copy_global_to_local_config branch 2 times, most recently from 2828400 to d77f1bf Compare December 16, 2020 11:39
@deivid-rodriguez deivid-rodriguez merged commit 352a1f5 into master Dec 16, 2020
@deivid-rodriguez deivid-rodriguez deleted the revert_change_to_copy_global_to_local_config branch December 16, 2020 14:15
deivid-rodriguez added a commit that referenced this pull request Dec 16, 2020
…o_local_config

Restore change to copy global with/without config locally upon `bundle install`

(cherry picked from commit 352a1f5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with running Rails application using Bundler 2.2.0
2 participants