Last active
February 3, 2016 21:12
-
-
Save glennpratt/b039e4558875a3608419 to your computer and use it in GitHub Desktop.
Reproduce bundler bug https://github.com/bundler/bundler/issues/4144
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
# Reproduce bundler bug: | |
# https://github.com/bundler/bundler/issues/4144 | |
rm -rf /tmp/bundler-GH-4144 | |
mkdir -p /tmp/bundler-GH-4144 | |
cd /tmp/bundler-GH-4144 | |
cat > Gemfile <<EOF | |
source 'https://rubygems.org' | |
gem 'puma' | |
gem 'sequel' | |
EOF | |
# Expected: | |
# binstubs load path should be vendor/bundle, for example: | |
# binstubs/sequel:$:.unshift File.expand_path '../../vendor/bundle', __FILE__ | |
# Result: | |
# binstubs load path fluctuates to a nested path - seemingly only when --jobs > 2 | |
# For example: | |
# binstubs/sequel:$:.unshift File.expand_path '../../vendor/bundle/ruby/2.2.0/gems/puma-2.16.0/ext/puma_http11/vendor/bundle', __FILE__ | |
# Run twice, usually at least one has a bad load path. | |
bundle install --path vendor/bundle --standalone --binstubs binstubs -j4 && grep unshift binstubs/* | |
bundle install --path vendor/bundle --standalone --binstubs binstubs -j4 && grep unshift binstubs/* |
Mine for 1.11.2:
./bundler-GH-4144.sh
+ rm -rf /tmp/bundler-GH-4144
+ mkdir -p /tmp/bundler-GH-4144
+ cd /tmp/bundler-GH-4144
+ cat
+ bundle install --path vendor/bundle --standalone --binstubs binstubs -j4
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using bundler 1.11.2
Installing puma 2.16.0 with native extensions
Installing sequel 4.31.0
Bundle complete! 2 Gemfile dependencies, 3 gems now installed.
Bundled gems are installed into ./vendor/bundle.
+ grep unshift binstubs/puma binstubs/pumactl binstubs/sequel
binstubs/puma:$:.unshift File.expand_path '../../vendor/bundle', __FILE__
binstubs/pumactl:$:.unshift File.expand_path '../../vendor/bundle', __FILE__
binstubs/sequel:$:.unshift File.expand_path '../../vendor/bundle/ruby/2.2.0/gems/puma-2.16.0/ext/puma_http11/vendor/bundle', __FILE__
+ bundle install --path vendor/bundle --standalone --binstubs binstubs -j4
Using puma 2.16.0
Using bundler 1.11.2
Using sequel 4.31.0
Bundle complete! 2 Gemfile dependencies, 3 gems now installed.
Bundled gems are installed into ./vendor/bundle.
+ grep unshift binstubs/puma binstubs/pumactl binstubs/sequel
binstubs/puma:$:.unshift File.expand_path '../../vendor/bundle', __FILE__
binstubs/pumactl:$:.unshift File.expand_path '../../vendor/bundle', __FILE__
binstubs/sequel:$:.unshift File.expand_path '../../vendor/bundle', __FILE__
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My output: