Skip to content
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

Rubygems integration broken? #4377

Closed
kirs opened this issue Dec 10, 2016 · 7 comments
Closed

Rubygems integration broken? #4377

kirs opened this issue Dec 10, 2016 · 7 comments

Comments

@kirs
Copy link
Contributor

kirs commented Dec 10, 2016

Environment

  • jruby 9.1.7.0-SNAPSHOT (2.3.1) 2016-12-10 6a6383c Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]
  • current master (6a6383c124ab75c9b8314412387eced038d7aaa2)

Expected Behavior

It's expected that require "rubygems" and related gem/bundler code works.

Actual Behavior

$ bin/jgem list
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:13: warning: already initialized constant VERSION
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:117: warning: already initialized constant RUBYGEMS_DIR
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:122: warning: already initialized constant WIN_PATTERNS
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:131: warning: already initialized constant GEM_DEP_FILES
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:140: warning: already initialized constant REPOSITORY_SUBDIRECTORIES
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:152: warning: already initialized constant REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:164: warning: already initialized constant READ_BINARY_ERRORS
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:174: warning: already initialized constant WRITE_BINARY_ERRORS
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:182: warning: already initialized constant LOADED_SPECS_MUTEX
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:1314: warning: already initialized constant MARSHAL_SPEC_DIR
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems/specification.rb:49: warning: already initialized constant NONEXISTENT_SPECIFICATION_VERSION
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems/specification.rb:72: warning: already initialized constant CURRENT_SPECIFICATION_VERSION
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems/specification.rb:78: warning: already initialized constant SPECIFICATION_VERSION_HISTORY
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems/specification.rb:96: warning: already initialized constant MARSHAL_FIELDS
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems/specification.rb:105: warning: already initialized constant TODAY
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems/specification.rb:107: warning: already initialized constant LOAD_CACHE
/Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems/specification.rb:160: warning: already initialized constant Dupable
LoadError: load error: rubygems/specification -- java.lang.NoSuchFieldError: recursive_cmp
       require at org/jruby/RubyKernel.java:961
  <module:Gem> at /Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:1333
        <main> at /Users/kir/Projects/opensource/jruby/lib/ruby/stdlib/rubygems.rb:116
       require at org/jruby/RubyKernel.java:961
        <main> at bin/jgem:8

I think this is something that broke recently because it stopped working as soon as I pulled the fresh master. If I checkout to older revision (d08116963f453e60e7c54e7feb6b7e2f7fab5412) it works.

@headius @enebo

@kirs
Copy link
Contributor Author

kirs commented Dec 10, 2016

Git bisect tells me the bug was introduced in ecc1fa82c30cd27706240ddc1b4138dcb6eb403d

@kares
Copy link
Member

kares commented Dec 11, 2016

interesting, run into it as well at some point while trying to run test/specs but somehow got around it...
also stdlib/rubygems.rb:13: warning: already initialized constant VERSION means double loading?!

@headius
Copy link
Member

headius commented Dec 11, 2016

Ok that's super weird. No idea how this could have broken loading. I will investigate.

@headius
Copy link
Member

headius commented Dec 11, 2016

Hmm wait...did you do a clean build? That error should not be possible with a clean build...we wouldn't have built in the first place.

@kares
Copy link
Member

kares commented Dec 11, 2016

think a full clean mvn -Pclean clean did the trick for me -> not 100% ... @kirs should be able to confirm.

@headius
Copy link
Member

headius commented Dec 12, 2016

I'm going to close this since it appears to be a build issue. @kirs If it still doesn't work after a clean build, please reopen.

@headius headius closed this as completed Dec 12, 2016
@headius headius added this to the Invalid or Duplicate milestone Dec 12, 2016
@kirs
Copy link
Contributor Author

kirs commented Dec 12, 2016

Thanks, it helped.
I was cleaning up with rm -rf build and looks like it didn't clean all the things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants