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

Merge 2-0-stable into master and get specs passing#6879

Closed
deivid-rodriguez wants to merge 50 commits intomasterfrom
colby/bundler-2-merge-test
Closed

Merge 2-0-stable into master and get specs passing#6879
deivid-rodriguez wants to merge 50 commits intomasterfrom
colby/bundler-2-merge-test

Conversation

@deivid-rodriguez
Copy link
Copy Markdown
Contributor

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

The problem is that master is still running specs against older rubies even if 2-0-stable is not. That means quite a lot of PRs are blocked because they don't pass tests on old rubies.

What was your diagnosis of the problem?

My diagnosis is that we need to officially start bundler 3 development.

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

My fix is to merge the 2-0-stable branch into master, bump the version to 3.0.0.dev in version.rb, stop testing against old rubies and get specs passing.

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

I chose this fix because it gets master green while including everything currently in the 2-0-stable branches.

Colby Swandale and others added 30 commits November 3, 2018 12:04
6763: Removed jobs with old ruby versions from Travis CI. r=colby-swandale a=hsbt

I removed the ruby versions under the Ruby 2.2. We need to fix gemspec and other parameters of .travis.yml. But this is the first step of Bundler-2.0.0 reboot.

Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
(cherry picked from commit 67771c0)
6740: Removed win32-open3 workaround. r=colby-swandale a=hsbt

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

`win32-open3` gem was required Ruby 1.8 with Windows environment. Because RubyInstaller2 only provides the version of Ruby 2.1+.

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

Removed needless workaround.



Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
(cherry picked from commit 6063718)
6741: Support Windows platform with ruby core repository. r=hsbt a=hsbt

In Windows environment, ':' is always contained path variable.

See our original commit and its message

ruby/ruby@f35fb6d

Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
(cherry picked from commit 3a69ee3)
6742: Use helper method instead of hard-code path. r=colby-swandale a=hsbt

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

In ruby core repository, We need to replace executable file like `ruby`, `rake`, `gem`. 

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

This pull request makes hard-coded executable file to the helper methods.



Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
(cherry picked from commit 3cc783b)
6743: Support file structure of ruby core repository. r=hsbt a=hsbt

In the ruby core repository, I put bundler executable and bundler libraries under the `bin` and `lib` directories. It breaks the current behavior.

Support the structure of ruby core repository.

Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
(cherry picked from commit 172ec59)
6786: Followed up #6743 r=hsbt a=hsbt

I fixed them.

Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
(cherry picked from commit 9cfe9bd)
backport #6737 to 1-16-stable

(cherry picked from commit 8a789f0)
6798: Use https in the Github shortcut by default in Bundler 2 r=colby-swandale a=colby-swandale

This PR is setting Git gems to be fetched over https by default.

Note: This PR is successing #6791

Closes #6785

Co-authored-by: Colby Swandale <me@colby.fyi>
(cherry picked from commit cf45792)
6818: Following up ruby core changes. r=hsbt a=hsbt

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

These changes enabled to use the same configuration of executables in ruby core repository.

  * To use libexec instead of bin directory.
  * Restore exe direcotry for bundler.gemspec while running test suite.

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

The ruby core repository uses `exe` directory for other usage. I chose `libexec` instead of `exe` in ruby core. And, The location of `bundler.gemspec` is not the root of the repository on ruby core. We should restore `libexec` to `exe` under the `lib` dir.

see. https://github.com/ruby/ruby/blob/trunk/lib/bundler.gemspec

Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
(cherry picked from commit a578c4e)
6853: add bundle-remove entry to bundler man page r=colby-swandale a=colby-swandale

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

The manual entry for `bundle remove` was missing in `bundle.ronn`

### What was your diagnosis of the problem?

See #6846

Fixes #6846

Co-authored-by: Colby Swandale <me@colby.fyi>
(cherry picked from commit 02cde1c)
6849: revert commit b490e73 r=colby-swandale a=colby-swandale

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

There is a *really* obscure bug in Bundler that is causing deploys in Heroku to fail for certain environments. 

The environment in this case being Ruby 1.9.3 and RubyGems 1.8

I also think that this is the same bug causing https://github.com/bundler/bundler/issues/6829

### What was your diagnosis of the problem?

See https://gist.github.com/schneems/0247e3d5c3e079ecffd7cd10887c3cc9

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

Revert the commit that was causing this bug. The original PR can be found at #6687

I can confirm the fix by being able to deploy to Heroku succesfully using Bundler 1.17.2 + the commit to revert the change being applied on top.

```
$ git push heroku master
Enumerating objects: 87, done.
Counting objects: 100% (87/87), done.
Delta compression using up to 4 threads
Compressing objects: 100% (72/72), done.
Writing objects: 100% (87/87), 28.14 KiB | 1.48 MiB/s, done.
Total 87 (delta 13), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-1.9.3
remote: -----> Installing dependencies using bundler 1.17.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        RubyGems 1.8.23.2 is not threadsafe, so your gems will be installed one at a time. Upgrade to RubyGems 2.1.0 or higher to enable parallel gem installation.
remote:        Fetching rake 10.0.3
remote:        Installing rake 10.0.3
remote:        Fetching i18n 0.6.1
remote:        Installing i18n 0.6.1
remote:        Fetching multi_json 1.5.0
remote:        Installing multi_json 1.5.0
remote:        Fetching activesupport 3.2.11
remote:        Installing activesupport 3.2.11
remote:        Fetching builder 3.0.4
remote:        Installing builder 3.0.4
remote:        Fetching activemodel 3.2.11
remote:        Installing activemodel 3.2.11
remote:        Fetching erubis 2.7.0
remote:        Installing erubis 2.7.0
remote:        Fetching journey 1.0.4
remote:        Installing journey 1.0.4
remote:        Fetching rack 1.4.4
remote:        Installing rack 1.4.4
remote:        Fetching rack-cache 1.2
remote:        Installing rack-cache 1.2
remote:        Fetching rack-test 0.6.2
remote:        Installing rack-test 0.6.2
remote:        Fetching hike 1.2.1
remote:        Installing hike 1.2.1
remote:        Fetching tilt 1.3.3
remote:        Installing tilt 1.3.3
remote:        Fetching sprockets 2.2.2
remote:        Installing sprockets 2.2.2
remote:        Fetching actionpack 3.2.11
remote:        Installing actionpack 3.2.11
remote:        Fetching mime-types 1.19
remote:        Installing mime-types 1.19
remote:        Fetching polyglot 0.3.3
remote:        Installing polyglot 0.3.3
remote:        Fetching treetop 1.4.12
remote:        Installing treetop 1.4.12
remote:        Fetching mail 2.4.4
remote:        Installing mail 2.4.4
remote:        Fetching actionmailer 3.2.11
remote:        Installing actionmailer 3.2.11
remote:        Fetching arel 3.0.2
remote:        Installing arel 3.0.2
remote:        Fetching tzinfo 0.3.35
remote:        Installing tzinfo 0.3.35
remote:        Fetching activerecord 3.2.11
remote:        Installing activerecord 3.2.11
remote:        Fetching activeresource 3.2.11
remote:        Installing activeresource 3.2.11
remote:        Using bundler 1.17.2
remote:        Fetching coffee-script-source 1.4.0
remote:        Installing coffee-script-source 1.4.0
remote:        Fetching execjs 1.4.0
remote:        Installing execjs 1.4.0
remote:        Fetching coffee-script 2.2.0
remote:        Installing coffee-script 2.2.0
remote:        Fetching rack-ssl 1.3.2
remote:        Installing rack-ssl 1.3.2
remote:        Fetching json 1.7.6
remote:        Installing json 1.7.6 with native extensions
remote:        Fetching rdoc 3.12
remote:        Installing rdoc 3.12
remote:        Fetching thor 0.16.0
remote:        Installing thor 0.16.0
remote:        Fetching railties 3.2.11
remote:        Installing railties 3.2.11
remote:        Fetching coffee-rails 3.2.2
remote:        Installing coffee-rails 3.2.2
remote:        Fetching jquery-rails 2.2.0
remote:        Installing jquery-rails 2.2.0
remote:        Fetching pg 0.14.1
remote:        Installing pg 0.14.1 with native extensions
remote:        Fetching rails 3.2.11
remote:        Installing rails 3.2.11
remote:        Fetching sass 3.2.5
remote:        Installing sass 3.2.5
remote:        Fetching sass-rails 3.2.6
remote:        Installing sass-rails 3.2.6
remote:        Fetching uglifier 1.3.0
remote:        Installing uglifier 1.3.0
remote:        Bundle complete! 6 Gemfile dependencies, 40 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into `./vendor/bundle`
remote:        Post-install message from rdoc:
remote:        Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote:
remote:        <= 1.8.6 : unsupported
remote:         = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote:         = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote:        >= 1.9.2 : nothing to do! Yay!
remote:        Bundle completed (14.08s)
remote:        Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        Asset precompilation completed (6.29s)
remote: -----> Detecting rails configuration
remote:
remote: ###### WARNING:
remote:
remote:        Injecting plugin 'rails_log_stdout'
remote:
remote: ###### WARNING:
remote:
remote:        Injecting plugin 'rails3_serve_static_assets'
remote:
remote: ###### WARNING:
remote:
remote:        Add 'rails_12factor' gem to your Gemfile to skip plugin injection
remote:
remote: ###### WARNING:
remote:
remote:        No Procfile detected, using the default web server.
remote:        We recommend explicitly declaring how to boot your server process via a Procfile.
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote:
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> console, rake, web
remote:
remote: -----> Compressing...
remote:        Done: 31.9M
remote: -----> Launching...
remote:        Released v6
remote:        https://glacial-ravine-68630.herokuapp.com/ deployed to Heroku
remote:
remote:  !   Warning: You are running on a deprecated stack.
remote:  !   Please upgrade to the latest stack by following the instructions on:
remote:  !   https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/glacial-ravine-68630.git
 * [new branch]      master -> master
```



Co-authored-by: Colby Swandale <me@colby.fyi>
(cherry picked from commit c3ba633)
bundlerbot and others added 16 commits December 30, 2018 15:14
6856: Test against Ruby 2.6 and RubyGems 3 r=colby-swandale a=segiddins

The problem was we weren't testing our compatibility with the latest and greatest.

Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
Co-authored-by: Colby Swandale <me@colby.fyi>
(cherry picked from commit a63a39d)
It turns out that every existing version of RubyGems will ignore the
required RubyGems version and try to install the newest version of
Bundler... until the middle of the install, when it will raise an
exception and fail.

There are some bugfixes in RubyGems 3 that improve the quality of life
for Bundler 2 users, but they are less bad than RubyGems simply
exploding anytime you try to run `gem install bundler`.
It turns out that every existing version of RubyGems will ignore the required RubyGems version and try to install the newest version of Bundler... until the middle of the install, when it will raise an exception and fail. This PR tries to fix that in the least-bad way possible.

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

The end user problem is that running `gem install bundler` now produces an exception on any Ruby and RubyGems older than 2.6 or 3.0 respectively.

What was your diagnosis of the problem?

Unfortunately, RubyGems does not use the `required_rubygems_version` to select an older version of Bundler to install. Instead, RubyGems tries to install the newest version even though that version is not compatible, and then raises an exception during installation because it is not compatible.

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

Lower the `required_rubygems_version` in Bundler 2 back down to RubyGems 2.5 or greater.

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

I chose this fix because it will stop RubyGems from raising an exception while installing Bundler 2, and instead allow the installation to complete successfully.

There are some bugfixes in RubyGems 3 that improve the quality of life for Bundler 2 users, but they are less bad than RubyGems simply exploding anytime you try to run `gem install bundler`.
* 2-0-stable: (39 commits)
  Version 2.0.1 with changelog
  update tested rubygems in travis
  Lower required RubyGems to 2.5 or greater
  Bundler 2.0 with changelog
  update CHANGELOG with new changes and release
  Merge #6856
  add RubyGems v3.0.1 to rg clone task
  Version 2.0.0.pre.3 wih changelog
  update tested versions of RubyGems in travis
  update gemspec to require RubyGems 3.0.0
  Merge #6849
  Merge #6853
  Revert "Version 2.0.0 with changelog"
  Version 2.0.0 with changelog
  fix breaking edge case spec
  Merge #6818
  bump bundler_2_mode in inject spec
  Version 2.0.0.pre.2 with Changelog
  fix failing major deprecation error spec
  remove :github source declaration from new gem template
  ...
All deprecations were delayed to bundler 3, so update the warnings.
Update bundler guards in specs as well to adapt to the delay.
So that deprecations are not printed making specs fail.
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

I got specs passing locally against 2.6, let's see what TravisCI says for other rubies.

Also, we have delayed deprecations to bundler 3 but I see no reason to not release the pending major deprecations on a future 2.x release. But we can discuss this separately, make a PR to 2-0-stable if we decide to do it, and then forwardport it to master.

@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

Should I cleanup the commit history of this branch? There are merge bundlerbot commits here targeted to master, so even though the final diff looks correct, the commit history is confusing and might trip up release and changelog scripts.

@colby-swandale
Copy link
Copy Markdown
Member

Let me sort out the deprecation issue, which should make the merge into master a lot easier.

@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

Sure!

@hsbt
Copy link
Copy Markdown
Member

hsbt commented Jan 23, 2019

@deivid-rodriguez How about the status of this branch? I'm okay to merge this into master branch.

@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

I'll try to get this ready to merge today! 👍

@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

Didn't manage to wrap it up today, will try tomorrow!

@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

I created #6933 to 2-0-stable to sort out deprecations. Then I can forward port those changes here and rebase this PR.

@colby-swandale colby-swandale force-pushed the colby/bundler-2-merge-test branch from 303129f to ccca7a6 Compare February 10, 2019 20:47
@deivid-rodriguez deivid-rodriguez force-pushed the colby/bundler-2-merge-test branch from ccca7a6 to 303129f Compare February 10, 2019 23:24
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

Closing in favor of #6957, @colby-swandale will manually cherry-pick any commits he needs from here.

@deivid-rodriguez deivid-rodriguez deleted the colby/bundler-2-merge-test branch March 28, 2019 15:00
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 this pull request may close these issues.

6 participants