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

Bundler does not vendor net-http-pipeline gem. #7521

Closed
marciotoshio opened this issue Dec 27, 2019 · 1 comment · Fixed by #7529
Closed

Bundler does not vendor net-http-pipeline gem. #7521

marciotoshio opened this issue Dec 27, 2019 · 1 comment · Fixed by #7529

Comments

@marciotoshio
Copy link
Contributor

If we already have the net-http-pipeline gem installed and try to vendor it the gem is not vendored because Bundler loads it before vendoring (https://github.com/bundler/bundler/blob/master/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb#L7).

To reproduce this:

1- Gemfile
source "https://rubygems.org" gem 'net-http-pipeline'
1- bundle install
1- bundle install --path vendor/bundle`` 1- bundle check`

Bundle check gives this:

The following gems are missing
 * net-http-pipeline (1.0.1)
Install missing gems with `bundle install`
@deivid-rodriguez
Copy link
Member

deivid-rodriguez commented Dec 31, 2019

Oh wow, I had no idea about this hidden dependency. Since the dependency is optional (require error is swallowed, and we're not using it), the simplest solution here seems to remove the require from the version we are vendoring.

@ghost ghost closed this as completed in 4bf7ea6 Jan 5, 2020
deivid-rodriguez pushed a commit that referenced this issue Jan 5, 2020
7529: Remove optional require net-http-pipeline from vendored net-http-persistent. r=deivid-rodriguez a=marciotoshio

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

See issue #7521.

### What was your diagnosis of the problem?

My diagnosis was If you have net-http-pipeline gem installed bundler loads it and you can't vendor it.

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

My fix is remove the optional require of net-http-pipeline.

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

I chose this fix because was a recommendation in the issue by @deivid-rodriguez

Fixes #7521.

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Co-authored-by: Marcio Toshio <marcio@tosh.io>
(cherry picked from commit 4bf7ea6)
ghost pushed a commit to rubygems/rubygems that referenced this issue Mar 11, 2020
7529: Remove optional require net-http-pipeline from vendored net-http-persistent. r=deivid-rodriguez a=marciotoshio

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

See issue rubygems/bundler#7521.

### What was your diagnosis of the problem?

My diagnosis was If you have net-http-pipeline gem installed bundler loads it and you can't vendor it.

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

My fix is remove the optional require of net-http-pipeline.

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

I chose this fix because was a recommendation in the issue by @deivid-rodriguez 

Fixes #7521.


Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Co-authored-by: Marcio Toshio <marcio@tosh.io>
This issue 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 a pull request may close this issue.

2 participants