Details

    • Type: New Feature New Feature
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: JRuby 1.7.0.pre2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Probably more of a question but in preview2 I noticed that JRuby.runtime no longer exists. Is there an equivalent? The BSON gem depends on it.

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        The debate rages on. It's still not clear whether we should load 'jruby' (and since it needs java integration, 'java' as well) by default, or if we should be moving toward loading less. I'm trending toward loading more in an efficient way (loading raw extensions is pretty cheap compared to full .rb requires) so we can start guaranteeing the same set of modules and features are available all the time, and that set includes java integration.

        We also want to be able to start implementing more and more of JRuby in Ruby, which requires both 'java' and 'jruby' functionality.

        But we worry about loading more, changing more stuff in global namespaces (like the java/javax/etc methods), and slowing down boot times.

        Show
        Charles Oliver Nutter added a comment - The debate rages on. It's still not clear whether we should load 'jruby' (and since it needs java integration, 'java' as well) by default, or if we should be moving toward loading less. I'm trending toward loading more in an efficient way (loading raw extensions is pretty cheap compared to full .rb requires) so we can start guaranteeing the same set of modules and features are available all the time, and that set includes java integration. We also want to be able to start implementing more and more of JRuby in Ruby, which requires both 'java' and 'jruby' functionality. But we worry about loading more, changing more stuff in global namespaces (like the java/javax/etc methods), and slowing down boot times.
        Hide
        kristian meier added a comment -

        from that "bug" I did learn that it is important to run CI over different versions of jruby combined with a set of different versions of java.

        I am sure to provide a consistent preloaded API across JVMs is very helpful for lazy programmers like me - if JRuby.runtime works I would never get the idea to maybe require something "more" since it might be not there in some other context.

        Show
        kristian meier added a comment - from that "bug" I did learn that it is important to run CI over different versions of jruby combined with a set of different versions of java. I am sure to provide a consistent preloaded API across JVMs is very helpful for lazy programmers like me - if JRuby.runtime works I would never get the idea to maybe require something "more" since it might be not there in some other context.
        Hide
        Thomas E Enebo added a comment -

        As Charlie notes 'jruby' requires 'java'. This change is a little broader in that if we require 'jruby' by default then we are really saying both 'java' and 'jruby' are always available.

        Personally, I like the idea of not requiring these additional libraries if you don't want them, but as we keep implementing more of JRuby in Ruby we find ourselves increasingly using 'java' and to a slightly lesser extent 'jruby'. This means the point may eventually become moot (as in Java 7 atm).

        If we do turn them on by default we should take some measurements beforehand to understand the sort of impact this adds. I know over time the files req

        Show
        Thomas E Enebo added a comment - As Charlie notes 'jruby' requires 'java'. This change is a little broader in that if we require 'jruby' by default then we are really saying both 'java' and 'jruby' are always available. Personally, I like the idea of not requiring these additional libraries if you don't want them, but as we keep implementing more of JRuby in Ruby we find ourselves increasingly using 'java' and to a slightly lesser extent 'jruby'. This means the point may eventually become moot (as in Java 7 atm). If we do turn them on by default we should take some measurements beforehand to understand the sort of impact this adds. I know over time the files req
        Hide
        Thomas E Enebo added a comment -

        uired by 'java' has grown.....don't know how that submitted prematurely

        Show
        Thomas E Enebo added a comment - uired by 'java' has grown.....don't know how that submitted prematurely
        Hide
        Charles Oliver Nutter added a comment -

        Some of the hit of loading 'java' could be reduced by condensing the files it loads into fewer files; that's fewer load path searches and fewer parser start/stops.

        We could also do what we're doing with the 'kernel' files and just load (rather than require) them directly from classloader resources, avoiding any load path searches at all.

        I will try to play with this today.

        Show
        Charles Oliver Nutter added a comment - Some of the hit of loading 'java' could be reduced by condensing the files it loads into fewer files; that's fewer load path searches and fewer parser start/stops. We could also do what we're doing with the 'kernel' files and just load (rather than require) them directly from classloader resources, avoiding any load path searches at all. I will try to play with this today.

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Brad Pardee
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: