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

[RubygemsExt] Add missing require rubygems/source #4944

Merged
merged 4 commits into from
Sep 10, 2016

Conversation

dekellum
Copy link
Contributor

@dekellum dekellum commented Sep 2, 2016

The change referenced below as released in 1.13.0.rc.2, may attempt to reference Gem::Source without it being loaded, resulting in:

  [!] There was an error parsing `Gemfile`:
  [!] There was an error while loading `elided.gemspec`: uninitialized constant Gem::Source. Bundler cannot continue.

Observed this on ruby 2.2.5 with stock rubygems 2.4.5 as well as upgraded rubygems 2.6.6. Add this require.

f9de70e by @segiddins:

[RubygemsExt] return Source::Installed from #source when appropriate

The change referenced below as released in 1.13.0.rc.2, may attempt to
reference Gem::Source without it being loaded, resulting in:

  [!] There was an error parsing `Gemfile`:
  [!] There was an error while loading `elided.gemspec`: uninitialized
  constant Gem::Source. Bundler cannot continue.

Observed this on ruby 2.2.5 with stock rubygems 2.4.5 as well as
upgraded rubygems 2.6.6. Add this require.

commit f9de70e
Author:     Samuel Giddins <segiddins@segiddins.me>
AuthorDate: Sun Jul 10 11:06:49 2016 -0300
Commit:     Samuel Giddins <segiddins@segiddins.me>
CommitDate: Tue Jul 19 17:13:19 2016 -0500

    [RubygemsExt] return Source::Installed from #source when appropriate
@dekellum
Copy link
Contributor Author

dekellum commented Sep 2, 2016

Hmm... might not be that simple, as this suggests:

rubygems/rubygems@d922a0f61

...that Gem::Source doesn't exist until rubygems 2.0.0?

@segiddins
Copy link
Member

Please add a test for the bug this is addressing -- thanks!

@dekellum
Copy link
Contributor Author

dekellum commented Sep 2, 2016

@segiddins I'll try to do that. There are CI tests for Rubygems as far back as 1.6.2 however, and there is no Gem::Source as referenced as far as I can tell in Rubygems versions before 2.0.0. Can you please comment on that?

@segiddins
Copy link
Member

The source method didn't exist before then either

@dekellum
Copy link
Contributor Author

dekellum commented Sep 2, 2016

Death by linter. Wish I new how to make rubocop happy when intentionally swallowing a load error.

@hsbt
Copy link
Member

hsbt commented Sep 10, 2016

Hi, I faced same error with Ruby 2.2 and 2.1 on travis builds. see. https://travis-ci.org/ruby/rake/builds/158902251

@indirect
Copy link
Member

@homu r+

@homu
Copy link
Contributor

homu commented Sep 10, 2016

📌 Commit 34404bb has been approved by indirect

@homu
Copy link
Contributor

homu commented Sep 10, 2016

⌛ Testing commit 34404bb with merge 3b5d047...

homu added a commit that referenced this pull request Sep 10, 2016
…irect

[RubygemsExt] Add missing require rubygems/source

The change referenced below as released in 1.13.0.rc.2, may attempt to reference Gem::Source without it being loaded, resulting in:

~~~
  [!] There was an error parsing `Gemfile`:
  [!] There was an error while loading `elided.gemspec`: uninitialized constant Gem::Source. Bundler cannot continue.
~~~

Observed this on ruby 2.2.5 with stock rubygems 2.4.5 as well as upgraded rubygems 2.6.6. Add this require.

f9de70e  by @segiddins:
> [RubygemsExt] return Source::Installed from #source when appropriate
@segiddins
Copy link
Member

I don't think we should be merging this without a test

@homu
Copy link
Contributor

homu commented Sep 10, 2016

☀️ Test successful - status

@homu homu merged commit 34404bb into rubygems:master Sep 10, 2016
@dekellum
Copy link
Contributor Author

Sorry gents, I have not been able to reduce the error to a spec in bundler's environment. @hsbt's rake repro. gave me some hope, with a public code base, but again I can not seem to replicate the same (feature usage? load order?) in a bundler spec. Thanks for the merge.

@fabdbt
Copy link

fabdbt commented Sep 12, 2016

Have same error using ruby-2.3.0 and bundler-1.13.0 on continuous integration.

segiddins pushed a commit that referenced this pull request Sep 13, 2016
…irect

[RubygemsExt] Add missing require rubygems/source

The change referenced below as released in 1.13.0.rc.2, may attempt to reference Gem::Source without it being loaded, resulting in:

~~~
  [!] There was an error parsing `Gemfile`:
  [!] There was an error while loading `elided.gemspec`: uninitialized constant Gem::Source. Bundler cannot continue.
~~~

Observed this on ruby 2.2.5 with stock rubygems 2.4.5 as well as upgraded rubygems 2.6.6. Add this require.

f9de70e  by @segiddins:
> [RubygemsExt] return Source::Installed from #source when appropriate

(cherry picked from commit 3b5d047)
@coilysiren coilysiren modified the milestone: 1.13 - Release 1.13.1 Sep 22, 2016
@coilysiren coilysiren modified the milestone: 1.13 - Release 1.13.1 Oct 3, 2016
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants