-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Bundle install with path and excluding a group fails when Gemfile.lock is present. #3981
Comments
Fails how? Can you please paste the output? |
Hi, here is the output. This only happens when we try to do a bundle install locally without a group that has gem from git.
|
@paresharma I could reproduce the error following the steps you've described. After some digging around, it seems that # in lib/bundler/installer.rb #resolve_if_need
# ...
begin
tmpdef = Definition.build(Bundler.default_gemfile, Bundler.default_lockfile, nil)
# `tmpdef.missing_specs` is empty
true unless tmpdef.new_platform? || tmpdef.missing_specs.any?
rescue BundlerError
end
# ... I'm not sure however if @indirect Any insights? |
I think that missing_specs should have |
Verified that this has been fixed in $ bundle install --path=vendor/bundle --without development
Fetching git://github.com/flori/json.git
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using bundler 1.11.2
Bundle complete! 1 Gemfile dependency, 1 gem now installed.
Gems in the group development were not installed.
Bundled gems are installed into ./vendor/bundle. |
@RochesterinNYC The issue still persists with v1.11.2. Please find below the trace for the same.
|
Okay, apologies. The exact Quick question @paresharma @indirect, what is the intended/expected behavior here? That this would be essentially a no-op because of the Though, I will note that the behavior/error occurs with simply |
@RochesterinNYC: Hi, I am interested in resolving this |
@asutoshpalai sure, go ahead. |
Running |
@asutoshpalai please let me know if you intend on resolving this, as I already might have a fix. |
Yes, I am still interested in resolving this, but I see that there is a already pull request for a related issue. |
If you're referring to #4353, that is a pull request for something different than this exact issue (it's related to the second part of @indirect's above comment. |
Yes, indirect's comment made me think so, my bad. I had investigated the issue a bit and now I am writing a failing spec for this issue. |
|
Checking out missing git repos (but not being installed) - Fixing #3981 Fixes #3981. As far as I investigated the problem is, being in `without` group, it is not marked in missing_spec and so it is not resolved while resolving specs at https://github.com/bundler/bundler/blob/master/lib/bundler/installer.rb#L183 and https://github.com/bundler/bundler/blob/master/lib/bundler/installer.rb#L195 but it is in the definition's index at https://github.com/bundler/bundler/blob/master/lib/bundler/definition.rb#L209 leading to https://github.com/bundler/bundler/blob/master/lib/bundler/source/git.rb#L150 where it checks for the presence of the folder at https://github.com/bundler/bundler/blob/master/lib/bundler/source/path.rb#L135 Possible solutions are : - add it to the list of missing_specs - check while building the index in Definition class and don't add it.
Here is my Gemfile and Gemfile.lock:
The following command fails if we don't have the gem from Github already checkout in
vendor/bundle
.bundle install --path=vendor/bundle --without development
It works if the Gemfile.lock is not present. Removing the Gemfile.lock is a work around.
Shouldn't this work or is there anything I'm doing wrong?
The text was updated successfully, but these errors were encountered: