JRuby

Gather all JRuby RubyGems changes out of RubyGems libs and into a single monkey-patching file

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1.2
  • Fix Version/s: JRuby 1.1.3
  • Component/s: Extensions
  • Labels:
    None
  • Number of attachments :
    2

Description

An upcoming version of RubyGems will allow implementations to specify a set of default settings in lib/ruby/site_ruby/1.8/rubygems/#{RUBY_ENGINE.downcase}.rb to allow overriding impl-specific requirements. We should prepare for this by moving all our hacks out of RubyGems code and into a single jruby.rb that monkeypatches appropriate places in RubyGems. We should do this for 1.1.3 so we're ready for that RubyGems release, whenever it happens.

Issue Links

Activity

Hide
Vladimir Sizikov added a comment -

Attached the diffs for the current customizations we have now, in bin and lib dirs.

Show
Vladimir Sizikov added a comment - Attached the diffs for the current customizations we have now, in bin and lib dirs.
Hide
Vladimir Sizikov added a comment -

Rubygems 1.2 has been released, and I"m in a process of integrating it into JRuby sources. After some testing, will push the update.

Show
Vladimir Sizikov added a comment - Rubygems 1.2 has been released, and I"m in a process of integrating it into JRuby sources. After some testing, will push the update.
Hide
Vladimir Sizikov added a comment -

Related to JRUBY-2704.

Show
Vladimir Sizikov added a comment - Related to JRUBY-2704.
Hide
Vladimir Sizikov added a comment -

It turned out that #{RUBY_ENGINE}.rb customizations, while very useful, cannot be used in all 100% cases, so we shill apply 3 patches over official sources.

See the following thread for details:
http://groups.google.com/group/rubygems-developers/browse_thread/thread/c892205435a0445f

I'm going to keep this bug open untill we resolve the last remaining patches.

At any rate, JRuby trunk has been updated to rubygems 1.2, and so far, the speed is awesome, and memory use is less than 40MB (instead of 600Mb previously!!!)

Please test rubygems 1.2 on trunk and report any issues, especially on Windows.

Show
Vladimir Sizikov added a comment - It turned out that #{RUBY_ENGINE}.rb customizations, while very useful, cannot be used in all 100% cases, so we shill apply 3 patches over official sources. See the following thread for details: http://groups.google.com/group/rubygems-developers/browse_thread/thread/c892205435a0445f I'm going to keep this bug open untill we resolve the last remaining patches. At any rate, JRuby trunk has been updated to rubygems 1.2, and so far, the speed is awesome, and memory use is less than 40MB (instead of 600Mb previously!!!) Please test rubygems 1.2 on trunk and report any issues, especially on Windows.
Hide
Vladimir Sizikov added a comment -

All current hacks over official rubyspec 1.2 sources are in the single revision:
http://svn.jruby.codehaus.org/changelog/jruby/?cs=7034

Show
Vladimir Sizikov added a comment - All current hacks over official rubyspec 1.2 sources are in the single revision: http://svn.jruby.codehaus.org/changelog/jruby/?cs=7034
Hide
Charles Oliver Nutter added a comment -

We could probably mark this resolved and open a separate bug to track the ongoing RubyGems work and moving remaining alterations to #{RUBY_ENGINE}.rb. The basic portion of this bug is done, and it would be nice to have it marked resolved for 1.1.3.

Show
Charles Oliver Nutter added a comment - We could probably mark this resolved and open a separate bug to track the ongoing RubyGems work and moving remaining alterations to #{RUBY_ENGINE}.rb. The basic portion of this bug is done, and it would be nice to have it marked resolved for 1.1.3.
Hide
Vladimir Sizikov added a comment -

I've just updated rubygems with newer config_file.rb from official rubygems installation, and it now allows better customization without directly modifying of upstream sources, and with that the install and update customizations (enable --env-shebang by default) are now moved to our jruby.rb file.

So, we have the only single direct change over upstream rubygems soures left (shebang value in installer):

--- a/lib/ruby/site_ruby/1.8/rubygems/installer.rb
+++ b/lib/ruby/site_ruby/1.8/rubygems/installer.rb
@@ -315,7 +315,9 @@ class Gem::Installer

   def shebang(bin_file_name)
     if @env_shebang then
-      "#!/usr/bin/env " + Gem::ConfigMap[:ruby_install_name]
+       # JRuby: Cannot use Gem::ConfigMap[:ruby_install_name] here,
+       # because it gets expanded into jruby.bat on Windows.
+       "#!/usr/bin/env jruby"
     else
       path = File.join @gem_dir, @spec.bindir, bin_file_name

Show
Vladimir Sizikov added a comment - I've just updated rubygems with newer config_file.rb from official rubygems installation, and it now allows better customization without directly modifying of upstream sources, and with that the install and update customizations (enable --env-shebang by default) are now moved to our jruby.rb file. So, we have the only single direct change over upstream rubygems soures left (shebang value in installer):
--- a/lib/ruby/site_ruby/1.8/rubygems/installer.rb
+++ b/lib/ruby/site_ruby/1.8/rubygems/installer.rb
@@ -315,7 +315,9 @@ class Gem::Installer

   def shebang(bin_file_name)
     if @env_shebang then
-      "#!/usr/bin/env " + Gem::ConfigMap[:ruby_install_name]
+       # JRuby: Cannot use Gem::ConfigMap[:ruby_install_name] here,
+       # because it gets expanded into jruby.bat on Windows.
+       "#!/usr/bin/env jruby"
     else
       path = File.join @gem_dir, @spec.bindir, bin_file_name

Hide
Vladimir Sizikov added a comment -

Marked as fixed, since almost everything has already been moved to jruby.rb file, except for a small single change, see the diff above.

Show
Vladimir Sizikov added a comment - Marked as fixed, since almost everything has already been moved to jruby.rb file, except for a small single change, see the diff above.

People

Vote (2)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: