-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Keep generating a Gemfile
in bundle init
for Bundler 2 and add an option to generate gems.rb
#6269
Conversation
bundle init
and instead make it an optionGemfile
in bundle init
for Bundler 2 and add an option to generate gems.rb
I think I agree with this line of reasoning? |
@segiddins did you have any questions? |
I think I'm okay with this. In the interests of reducing surprise, shipping 2.x without making |
After thinking about this for a few more minutes, I personally would like to be able to set a config flag with the same effect as |
@colby-swandale no questions. Just saying I think I agree, but I'm not 100% sure what the right thing to do is :) |
☔ The latest upstream changes (presumably #6266) made this pull request unmergeable. Please resolve the merge conflicts. |
I agree with this PR in combination with @indirect's suggestion of keeping the feature flag! 👍 |
@colby-swandale still interested in re-enabling the feature flag and merging this? |
i'll put the setting back. |
a650968
to
85e7249
Compare
This PR was superseded by #7113, which implements the same line of reasoning, so closing! |
What was the end-user problem that led to this PR?
The
bundle init
command in Bundler 2 currently generates agems.rb
file by default. The issue with this is that i believe we're pushinggems.rb
as a "successor" to the Gemfile that everyone should be using even though there is no real incentive for nearly any ruby project to do so.All the documentation on the internet about the the
gemfile
is referred to asGemfile
which I can see will confuse new users to Ruby. If they're looking to add a gem to their project and see the project's README there is a very good chance it will say to "add to the Gemfile and run bundle install" Example 1, Example 2 people will get confused from this. Or if they're learning Bundler for the first time and come across a blog post that talks about thegemfile
which is actuallygems.rb
in their project will also cause confusion for the user.The last issue i see is that we'll be creating a situation where a lot of projects will be using
Gemfile
and others will be usinggems.rb
and that this transition may never be complete because the incentive is just not there.I believe these issues outweigh the benefit of forcing
gems.rb
onto users in the UI and I want to propose that we instead havebundle init
keep generating aGemfile
as it has been but introduce an option to generate agems.rb
if the user needs it.(Note: the
bundle gem
command is un-effected as we didn't get around to update the command to usegems.rb
in Bundler 2)What is your fix for the problem, implemented in this PR?
Make
bundle init
continue to generate aGemfile
by default and add an option to allow generating agems.rb
file if needed.cc @indirect @segiddins