New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort files *after* compacting them to avoid problem in Ruby 1.8.7 #763

Merged
merged 1 commit into from Dec 30, 2013

Conversation

Projects
None yet
10 participants
@floehopper
Contributor

floehopper commented Dec 28, 2013

Pull request #612 introduced sorting of Gem::Specification#files.

However, as @pixeltrix pointed out in [1,2], nil#<=> is not defined in Ruby
versions before v1.9.3. By doing the #sort after the #compact, we can
avoid this problem without changing the behaviour.

This was causing a fatal Bundler error in my Ruby v1.8.7 builds on Travis CI.
See [3] for an example of the fatal error.

See also my initial issue on Travis CI [4] and subsequent issue on Bundler [5].

[1] https://twitter.com/pixeltrix/status/416950629786189824
[2] https://twitter.com/pixeltrix/status/416950640242622465
[3] https://travis-ci.org/freerange/mocha/jobs/16068647#L50
[4] travis-ci/travis-ci#1793
[5] bundler/bundler#2784

Sort files *after* compacting them to avoid problem in Ruby 1.8.7
Pull request #612 introduced sorting of `Gem::Specification#files`.

However, as @pixeltrix pointed out in [1,2], `nil#<=>` is not defined in Ruby
versions before v1.9.3. By doing the `#sort` *after* the `#compact`, we can
avoid this problem without changing the behaviour.

This was causing a fatal Bundler error in my Ruby v1.8.7 builds on Travis CI.
See [3] for an example of the fatal error.

See also my initial issue on Travis CI [4] and subsequent issue on Bundler [5].

[1] https://twitter.com/pixeltrix/status/416950629786189824
[2] https://twitter.com/pixeltrix/status/416950640242622465
[3] https://travis-ci.org/freerange/mocha/jobs/16068647#L50
[4] travis-ci/travis-ci#1793
[5] bundler/bundler#2784
@rkh

This comment has been minimized.

Show comment
Hide comment
@rkh

rkh Dec 28, 2013

Seeing this on a couple of projects on Travis CI.

rkh commented Dec 28, 2013

Seeing this on a couple of projects on Travis CI.

@sporkmonger

This comment has been minimized.

Show comment
Hide comment
@sporkmonger

sporkmonger Dec 29, 2013

Also running into this. Seems like an easy fix. 👍

Though tests are always nice.

sporkmonger commented Dec 29, 2013

Also running into this. Seems like an easy fix. 👍

Though tests are always nice.

@shioyama

This comment has been minimized.

Show comment
Hide comment
@shioyama

shioyama Dec 29, 2013

Also getting this error on Travis CI. Would be great to get this fix merged.

shioyama commented Dec 29, 2013

Also getting this error on Travis CI. Would be great to get this fix merged.

@shioyama

This comment has been minimized.

Show comment
Hide comment
@shioyama

shioyama Dec 29, 2013

It seems the Travis CI client itself is getting this error in its own tests.

shioyama commented Dec 29, 2013

It seems the Travis CI client itself is getting this error in its own tests.

kylog pushed a commit to puppetlabs/puppet that referenced this pull request Dec 29, 2013

Kylo Ginsberg
(maint) Add temp workaround for travis
Rubygems broke travis builds on ruby 1.8.7:

travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is
updated.
@tnm

This comment has been minimized.

Show comment
Hide comment
@tnm

tnm Dec 30, 2013

👍 Affecting linguist's 1.8.7 builds on Travis.

tnm commented Dec 30, 2013

👍 Affecting linguist's 1.8.7 builds on Travis.

tystr added a commit to tystr/puppet-newrelic that referenced this pull request Dec 30, 2013

Added workound for rubygems/rubygems#763
Rubygems broke travis builds for rvm 1.8.7

shioyama added a commit to globalize/globalize that referenced this pull request Dec 30, 2013

shioyama added a commit to globalize/globalize that referenced this pull request Dec 30, 2013

shioyama added a commit to globalize/globalize that referenced this pull request Dec 30, 2013

thorin added a commit to thorin/redmine_ldap_sync that referenced this pull request Dec 30, 2013

thorin added a commit to thorin/redmine_ldap_sync that referenced this pull request Dec 30, 2013

@ms-ati

This comment has been minimized.

Show comment
Hide comment
@ms-ati

ms-ati Dec 30, 2013

Contributor

+1

Contributor

ms-ati commented Dec 30, 2013

+1

ms-ati added a commit to ms-ati/docile that referenced this pull request Dec 30, 2013

@tystr

This comment has been minimized.

Show comment
Hide comment
@tystr

tystr commented Dec 30, 2013

👍

ms-ati added a commit to ms-ati/process_shared that referenced this pull request Dec 30, 2013

Add workaround for rubygems/rubygems#763
This defect in Rubygems 2.2.0 breaks all 1.8.x builds on Travis CI.

Workaround until the fix is deployed is to pin builds to latest 2.1.x
build of Rubygems.

sferik added a commit to lostisland/faraday that referenced this pull request Dec 30, 2013

Add temporary workaround for failing build on Ruby 1.8.7
Rubygems broke builds on Ruby 1.8.7:

travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.

sferik added a commit that referenced this pull request Dec 30, 2013

Merge pull request #763 from floehopper/fix-gem-specification-files-i…
…n-ruby-1-8-7

Sort files *after* compacting them to avoid problem in Ruby 1.8.7

@sferik sferik merged commit 335ea9d into rubygems:master Dec 30, 2013

1 check passed

default The Travis CI build passed
Details
@sferik

This comment has been minimized.

Show comment
Hide comment
@sferik

sferik Dec 30, 2013

Member

I’ll coordinate with @drbrain, @zenspider, and @evanphx about pushing a patch release that includes this change. I’ll also add a test that fails on Ruby version < 1.9.3 if this patch is reverted.

Member

sferik commented Dec 30, 2013

I’ll coordinate with @drbrain, @zenspider, and @evanphx about pushing a patch release that includes this change. I’ll also add a test that fails on Ruby version < 1.9.3 if this patch is reverted.

sferik added a commit that referenced this pull request Dec 30, 2013

Add tests for sorting files after compacting
I'm not sure how any of these values ended up as nil, since they are
converted to an array upon setting and getting, but it seemed to be
happening in the wild. See #763

sferik added a commit to erikhuda/thor that referenced this pull request Dec 30, 2013

Add temporary workaround for failing build on Ruby 1.8.7
Rubygems broke builds on Ruby 1.8.7:

travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.

sferik added a commit to rubygems/gems that referenced this pull request Dec 30, 2013

Add temporary workaround for failing build on Ruby 1.8.7
Rubygems broke builds on Ruby 1.8.7:

travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.
@floehopper

This comment has been minimized.

Show comment
Hide comment
@floehopper

floehopper Dec 30, 2013

Contributor

@sferik I did start trying to write a failing test, but I couldn't find an existing test that was testing for the presence of the call to #compact, so I wasn't sure of the best way to test the changed behaviour.

Contributor

floehopper commented Dec 30, 2013

@sferik I did start trying to write a failing test, but I couldn't find an existing test that was testing for the presence of the call to #compact, so I wasn't sure of the best way to test the changed behaviour.

sferik added a commit to sferik/mlb that referenced this pull request Dec 30, 2013

Add temporary workaround for failing build on Ruby 1.8.7
Rubygems broke builds on Ruby 1.8.7:

travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.

sferik added a commit to oauth-xx/oauth2 that referenced this pull request Dec 30, 2013

Add temporary workaround for failing build on Ruby 1.8.7
Rubygems broke builds on Ruby 1.8.7:

travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.

tystr added a commit to tystr/puppet-newrelic that referenced this pull request Jan 8, 2014

This has been fixed in rubygems
Revert "Added workound for rubygems/rubygems#763"

This reverts commit b602bc1.

karmi added a commit to elastic/elasticsearch-ruby that referenced this pull request Jan 8, 2014

carlossg added a commit to rodjek/librarian-puppet that referenced this pull request Jan 9, 2014

Update rubygems in travis now that 763 is fixed
rubygems/rubygems#763 was fixed
Update puppet versions to latest releases

sferik added a commit to lostisland/faraday that referenced this pull request Jan 9, 2014

Add temporary workaround for failing build on Ruby 1.8.7
Rubygems broke builds on Ruby 1.8.7:

travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.

scambra pushed a commit to activescaffold/active_scaffold that referenced this pull request Jan 10, 2014

Sergio Cambra
Rubygems broke builds on Ruby 1.8.7:
travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.

hidakatsuya added a commit to thinreports/thinreports-generator that referenced this pull request Jan 11, 2014

Temporary workaround for failing 1.8.7 Ruby/Travis
Rubygems broke Travis/Bundler builds on Ruby 1.8.7:

* travis-ci/travis-ci#1793
* rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.

webbj74 added a commit to webbj74/puppet-fitbit that referenced this pull request Jan 11, 2014

webbj74 added a commit to webbj74/puppet-fitbit that referenced this pull request Jan 11, 2014

mkdynamic added a commit to mkdynamic/omniauth-facebook that referenced this pull request Jan 11, 2014

Add temporary workaround for failing build on Ruby 1.8.7
Rubygems broke builds on Ruby 1.8.7:

travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.

@mLewisLogic mLewisLogic referenced this pull request Jan 13, 2014

Merged

Sanitize statsd path #10

ngoto added a commit to ngoto/bioruby that referenced this pull request Jan 17, 2014

.travis.yml: workaround to avoid error in Ruby 1.8.7 and jruby-18mode
 * workaround to avoid error in Ruby 1.8.7 and jruby-18mode
   (reference: rubygems/rubygems#763 )

floehopper added a commit to freerange/mocha.methods that referenced this pull request Mar 14, 2014

Use standard version of RubyGems in Travis build
Now that rubygems/rubygems#763 has been fixed, we should be able to do without the `before_install` hook - assuming that Travis CI builds are using the latest RubyGems i.e. v2.2.1.

floehopper added a commit to freerange/mocha.methods that referenced this pull request Mar 14, 2014

Update to the latest RubyGems for Travis builds
In order to obtain the fix to rubygems/rubygems#763, we need at least RubyGems v2.2.1. However the default version provided by Travis CI is v2.2.0.

floehopper added a commit to freerange/mocha.methods that referenced this pull request Mar 14, 2014

Use standard version of RubyGems in Travis build
Now that rubygems/rubygems#763 has been fixed, we should be able to do without the `before_install` hook - assuming that Travis CI builds are using the latest RubyGems i.e. v2.2.1.

floehopper added a commit to freerange/mocha.methods that referenced this pull request Mar 14, 2014

Update to the latest RubyGems for Travis builds
In order to obtain the fix to rubygems/rubygems#763, we need at least RubyGems v2.2.1. However the default version provided by Travis CI is v2.2.0.

philandstuff added a commit to alphagov/puppet-elasticsearch-deprecated that referenced this pull request Mar 24, 2014

philandstuff added a commit to alphagov/puppet-elasticsearch-deprecated that referenced this pull request Mar 24, 2014

workaround issue with rubygems under ruby 1.8.7
We need the fix for rubygems/rubygems#763, which was delivered in
rubygems 2.2.1.  Some travis workers are still on rubygems 2.2.0, which
causes intermittent failures.  This commit pins to rubygems 2.2.2, the
latest version at time of commit.  I don't really want to pin to a
particular version but I'm not sure how to say "at least 2.2.1" from the
command line.

See also travis-ci/travis-ci#1793.

tmclaugh pushed a commit to hubspotdevops/puppetlabs-mongodb that referenced this pull request Jul 24, 2014

Chris Hoge Tom McLaughlin
Temporary workaround for failing 1.8.7 Ruby/Travis
Rubygems broke Travis/Bundler builds on Ruby 1.8.7:

* travis-ci/travis-ci#1793
* rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.

plribeiro3000 added a commit to plribeiro3000/fog that referenced this pull request Dec 21, 2014

Remove command gem update from travis build
This were being executed to fix an issue related to rubygems
(rubygems/rubygems#763).
This was fixed and merged 1 year ago.

@wazery wazery referenced this pull request Apr 7, 2015

Open

No layout for SASS #110

cegeka-jenkins pushed a commit to cegeka/puppet-concat that referenced this pull request Oct 23, 2017

remove workaround for Rubygems 2.2.0 bug
rubygems/rubygems#763 is merged and released in
Rubygems 2.2.1. A forced downgrade is no longer required.

cegeka-jenkins pushed a commit to cegeka/puppet-mongodb that referenced this pull request Oct 23, 2017

Chris Hoge
Temporary workaround for failing 1.8.7 Ruby/Travis
Rubygems broke Travis/Bundler builds on Ruby 1.8.7:

* travis-ci/travis-ci#1793
* rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment