-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Gemfile is evaluated twice when a lockfile exists #3096
Comments
Theoretically, that first attempt will be the only attempt if the needed gems are already present. It's probably possible to skip evaluating the Gemfile twice, though. On Sat, Jul 12, 2014 at 3:34 PM, Michael Grosser notifications@github.com
|
Still happens when all gems are present, so happens every time. On Sat, Jul 12, 2014 at 10:24 PM, André Arko notifications@github.com
|
The Gemfile needs to have at least one gem statement to reproduce this issue. |
So I took a look, and the second evaluation happens at https://github.com/bundler/bundler/blob/master/lib/bundler/installer.rb#L69, where it's checked whether we need to do a |
I have a fix for this that I'll PR in a minute |
If anyone wants to help with segiddins's PR for this, that's here -> #4417 |
This is now fixed on 2.0 |
no Gemfile.lock -> WUT
with Gemfile.lock -> WUTWUT
tracked it down to this guy: https://github.com/bundler/bundler/blob/master/lib/bundler/installer.rb#L63-L71
I guess it should reuse the definition from https://github.com/bundler/bundler/blob/master/lib/bundler/cli/install.rb#L77-L78
not only
bundle install
also bundle exec ruby -e 1 evaluates the Gemfile twice, so basically every bundle run could save a few milisecondsThe text was updated successfully, but these errors were encountered: