Conversation
|
Ok, so the PR is wrong. So I leave it up to you 😊 |
2a4b53a to
e6d0802
Compare
|
It was just style thing, so second try and then I'll leave it to you ... |
|
Hm, failed again. Maybe the branching should be removed entirely because it had not effect so far ... |
|
@voxik I don't know what the condition wanted to do, but the branch doesn't seem accesible to me either. Can you try removing the whole branch? |
|
I took a quick look at this too and have no idea what was intended. |
|
My guess was that it wanted to do |
|
ping @segiddins. Are you able to offer any insights? |
|
@deivid-rodriguez's guess is my guess too? |
Hei @voxik! Are you up for removing the whole branch? |
e6d0802 to
b490e73
Compare
|
I think the latest version might be the right fix in the end. |
|
But I still can drop the condition entirely, if you prefer. |
|
Given that the previous version of the code didn't make any sense, I think it might actually be dead code, or don't have any influence at all if it's actually run. So I'm curious about removing the branch and see if any tests fail. |
|
👍🏻 |
|
I don't think the test would fail if I removed the branch. I think that the branch is actually performance optimization which is not used ATM, so you can't really notice. The code appears to add Bundler specification to the index. There is a chance that the Bunler spec is already loaded, that is what the fist branch trying to check. But if it is not loaded, then it tries to go through all available .gemspec files and load the proper specification to the memory, which might be slower. OTOH if nobody noticed so far, then I should really just remove it ❓ |
|
You raise a good point. If we want to leave |
|
@bundlerbot r+ |
6687: Fix assignment in condition. r=colby-swandale a=voxik
I am not sure what is the purpose of this code neither I have idea if the proposed fix is actually correct, but I am quite sure that the condition does not make sense, because the assignment takes priority and therefore the branch is never accessible. So I just take a guess and submitted this PR to open the discussion ;)
Please note this was pointed out by Coverity scan of the Bundler code:
~~~
Error: DEADCODE (CWE-561):
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: cond_return: Condition "nil && Bundler.rubygems().loaded_specs("bundler")", returning "nil". Now the type of "nil && Bundler.rubygems().loaded_specs("bundler")" must be null.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: assignment: Assigning: "loaded_spec" = "nil && Bundler.rubygems().loaded_specs("bundler")".
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: possible_types: At condition "loaded_spec = (nil && Bundler.rubygems().loaded_specs("bundler"))", the type of "loaded_spec" must be null.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: implied_false: "nil" implies that the truth value of "nil" must be false.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: cond_return: Condition "nil && Bundler.rubygems().loaded_specs("bundler")", returning "nil". The truth value of "nil && Bundler.rubygems().loaded_specs("bundler")" must be false.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: truth: At condition "loaded_spec = (nil && Bundler.rubygems().loaded_specs("bundler"))", the truth value of "loaded_spec" must be false.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: dead_error_condition: The condition "loaded_spec = (nil && Bundler.rubygems().loaded_specs("bundler"))" cannot be true.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: dead_error_line: Execution cannot reach the expression "idx << loaded_spec" inside this statement: "(loaded_spec = (nil && Bund...".
# 20| s.loaded_from = File.expand_path("..", __FILE__)
# 21| end
# 22|-> if loaded_spec = nil && Bundler.rubygems.loaded_specs("bundler")
# 23| idx << loaded_spec # this has to come after the fake gemspec, to override it
# 24| elsif local_spec = Bundler.rubygems.find_name("bundler").find {|s| s.version.to_s == VERSION }
~~~
Co-authored-by: Vít Ondruch <vondruch@redhat.com>
|
For what it's worth, this code was never correct, it landed to the repo as a dead branch, so it's never been run: 0f336c7#diff-51985a7d9ef96ac04e41b9878ea202c9R20. Not saying we shouldn't do this, just sharing the history of that line of code :) |
Build succeeded |
6687: Fix assignment in condition. r=colby-swandale a=voxik
I am not sure what is the purpose of this code neither I have idea if the proposed fix is actually correct, but I am quite sure that the condition does not make sense, because the assignment takes priority and therefore the branch is never accessible. So I just take a guess and submitted this PR to open the discussion ;)
Please note this was pointed out by Coverity scan of the Bundler code:
~~~
Error: DEADCODE (CWE-561):
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: cond_return: Condition "nil && Bundler.rubygems().loaded_specs("bundler")", returning "nil". Now the type of "nil && Bundler.rubygems().loaded_specs("bundler")" must be null.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: assignment: Assigning: "loaded_spec" = "nil && Bundler.rubygems().loaded_specs("bundler")".
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: possible_types: At condition "loaded_spec = (nil && Bundler.rubygems().loaded_specs("bundler"))", the type of "loaded_spec" must be null.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: implied_false: "nil" implies that the truth value of "nil" must be false.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: cond_return: Condition "nil && Bundler.rubygems().loaded_specs("bundler")", returning "nil". The truth value of "nil && Bundler.rubygems().loaded_specs("bundler")" must be false.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: truth: At condition "loaded_spec = (nil && Bundler.rubygems().loaded_specs("bundler"))", the truth value of "loaded_spec" must be false.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: dead_error_condition: The condition "loaded_spec = (nil && Bundler.rubygems().loaded_specs("bundler"))" cannot be true.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: dead_error_line: Execution cannot reach the expression "idx << loaded_spec" inside this statement: "(loaded_spec = (nil && Bund...".
# 20| s.loaded_from = File.expand_path("..", __FILE__)
# 21| end
# 22|-> if loaded_spec = nil && Bundler.rubygems.loaded_specs("bundler")
# 23| idx << loaded_spec # this has to come after the fake gemspec, to override it
# 24| elsif local_spec = Bundler.rubygems.find_name("bundler").find {|s| s.version.to_s == VERSION }
~~~
Co-authored-by: Vít Ondruch <vondruch@redhat.com>
(cherry picked from commit 8c080ff)
6687: Fix assignment in condition. r=colby-swandale a=voxik
I am not sure what is the purpose of this code neither I have idea if the proposed fix is actually correct, but I am quite sure that the condition does not make sense, because the assignment takes priority and therefore the branch is never accessible. So I just take a guess and submitted this PR to open the discussion ;)
Please note this was pointed out by Coverity scan of the Bundler code:
~~~
Error: DEADCODE (CWE-561):
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: cond_return: Condition "nil && Bundler.rubygems().loaded_specs("bundler")", returning "nil". Now the type of "nil && Bundler.rubygems().loaded_specs("bundler")" must be null.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: assignment: Assigning: "loaded_spec" = "nil && Bundler.rubygems().loaded_specs("bundler")".
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: possible_types: At condition "loaded_spec = (nil && Bundler.rubygems().loaded_specs("bundler"))", the type of "loaded_spec" must be null.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: implied_false: "nil" implies that the truth value of "nil" must be false.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: cond_return: Condition "nil && Bundler.rubygems().loaded_specs("bundler")", returning "nil". The truth value of "nil && Bundler.rubygems().loaded_specs("bundler")" must be false.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: truth: At condition "loaded_spec = (nil && Bundler.rubygems().loaded_specs("bundler"))", the truth value of "loaded_spec" must be false.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: dead_error_condition: The condition "loaded_spec = (nil && Bundler.rubygems().loaded_specs("bundler"))" cannot be true.
rubygem-bundler-1.16.1/usr/share/gems/gems/bundler-1.16.1/lib/bundler/source/metadata.rb:22: dead_error_line: Execution cannot reach the expression "idx << loaded_spec" inside this statement: "(loaded_spec = (nil && Bund...".
# 20| s.loaded_from = File.expand_path("..", __FILE__)
# 21| end
# 22|-> if loaded_spec = nil && Bundler.rubygems.loaded_specs("bundler")
# 23| idx << loaded_spec # this has to come after the fake gemspec, to override it
# 24| elsif local_spec = Bundler.rubygems.find_name("bundler").find {|s| s.version.to_s == VERSION }
~~~
Co-authored-by: Vít Ondruch <vondruch@redhat.com>
(cherry picked from commit 8c080ff)
* 1-16-stable: Version 1.16.6 with changelog fix uninitialized @use_gvp instance var warning no longer test Ruby 1.9.3 against rubygems master Merge #6708 Auto merge of #6697 - walf443:added_changelog_section, r=hsbt Merge #6687 Merge #6686 Auto merge of #6670 - bundler:colby/invite-stephanie-morillo, r=segiddins Auto merge of #6627 - agrim123:agr-fix-add-groups, r=deivid-rodriguez Auto merge of #6612 - hdf1986:readme-bundle-add, r=segiddins Auto merge of #6495 - bundler:segiddins/6491-extra-gem-platform-in-lockfile, r=segiddins Auto merge of #6493 - agrim123:agr-update-bundle-update-docs, r=colby-swandale Auto merge of #6310 - utilum:rescue_unspecified_exception, r=segiddins Auto merge of #6184 - arbonap:pa-check-in-gemfile-docs, r=indirect fix typo
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>
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)
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)
7542: Make test platform independent r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that a test for the `gemspec` DSL is failing on Windows. ### What was your diagnosis of the problem? My diagnosis was that the test uses local platforms (that change between OS) but asserts for ruby platforms. ### What is your fix for the problem, implemented in this PR? My fix is to add a proper stub. ### Why did you choose this fix out of the possible options? I chose this fix because it was suggested in #6887 by @janpio and looks good. Closes #6687. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
I am not sure what is the purpose of this code neither I have idea if the proposed fix is actually correct, but I am quite sure that the condition does not make sense, because the assignment takes priority and therefore the branch is never accessible. So I just take a guess and submitted this PR to open the discussion ;)
Please note this was pointed out by Coverity scan of the Bundler code: