Details

    • Type: Task Task
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.pre1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      jruby 1.7.0.dev
    • Number of attachments :
      0

      Description

      From jruby 1.7.0.dev, circular require is warned in 1.9 mode like CRuby 1.9. And our RubyGems maven extension causes warnings by circular require.

      I patched RubyGems at 409c61fb5dace5fc7b532bd78e7d7b4c2ed1bb61 but it modifies RubyGems itself which would make RubyGems update harder.

      The requirements are;

      • we want to load maven_gemify.rb only if spec_fetcher is required (SpecFetcher is defined by autoload).
      • we need to load maven_gemify.rb after spec_fetcher and remote_fetcher to override those definitions.

      We should find a way to do above before 1.7.0 GA. I'll try it once RubyGems is updated.

        Issue Links

          Activity

          Hide
          Hiroshi Nakamura added a comment -

          Fixed at master.

          commit d05b492b335945740977dd2a63d8f80278062fb3
          Author: Hiroshi Nakamura <nahi@ruby-lang.org>
          Date:   Tue Sep 6 17:37:37 2011 +0900
          
              JRUBY-5985: circular require warning from RubyGems maven extension
              
              Try to use autoload to load rubygems/maven_gemify. It started to work by
              RubyGems update but it's tricky. Hope we can hook RubyGems in the
              future.
          
          Show
          Hiroshi Nakamura added a comment - Fixed at master. commit d05b492b335945740977dd2a63d8f80278062fb3 Author: Hiroshi Nakamura <nahi@ruby-lang.org> Date: Tue Sep 6 17:37:37 2011 +0900 JRUBY-5985: circular require warning from RubyGems maven extension Try to use autoload to load rubygems/maven_gemify. It started to work by RubyGems update but it's tricky. Hope we can hook RubyGems in the future.
          Hide
          Hiroshi Nakamura added a comment - - edited
          Show
          Hiroshi Nakamura added a comment - - edited Sorry, I broke the build... http://ci.jruby.org/job/jruby-test-jar-complete/1130/console
          Hide
          Hiroshi Nakamura added a comment -

          I re-applied a temporal fix 409c61fb5dace5fc7b532bd78e7d7b4c2ed1bb61 at f7f34b4e2f60c49928fb7920ff88468604d76f08 for user's convenience.

          Show
          Hiroshi Nakamura added a comment - I re-applied a temporal fix 409c61fb5dace5fc7b532bd78e7d7b4c2ed1bb61 at f7f34b4e2f60c49928fb7920ff88468604d76f08 for user's convenience.
          Hide
          Blake Smith added a comment -

          I'm still seeing this with 1.7.0.preview1 when booting a rails app that uses bundler.

          blake@G10062:~/projects/groupon/myapp  script/rails c
          Loading development environment (Rails 3.2.3)
          /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/maven_gemify.rb:2 warning: loading in progress, circular require considered harmful - rubygems/spec_fetcher
               require at org/jruby/RubyKernel.java:991
               require at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:36
                (root) at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/maven_gemify.rb:2
               require at org/jruby/RubyKernel.java:991
               require at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:36
                (root) at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/spec_fetcher.rb:1
               require at org/jruby/RubyKernel.java:991
               require at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:36
                (root) at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/spec_fetcher.rb:307
                (root) at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/source.rb:1
                (root) at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/source.rb:4
                (root) at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/dsl.rb:1
            initialize at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/dsl.rb:19
              evaluate at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/dsl.rb:6
                 build at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/definition.rb:18
            definition at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler.rb:135
               require at org/jruby/RubyKernel.java:991
                  load at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler.rb:123
          jruby-1.7.0.preview1 :001 > 
          

          Should this be fixed in preview1?

          Show
          Blake Smith added a comment - I'm still seeing this with 1.7.0.preview1 when booting a rails app that uses bundler. blake@G10062:~/projects/groupon/myapp script/rails c Loading development environment (Rails 3.2.3) /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/maven_gemify.rb:2 warning: loading in progress, circular require considered harmful - rubygems/spec_fetcher require at org/jruby/RubyKernel.java:991 require at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/maven_gemify.rb:2 require at org/jruby/RubyKernel.java:991 require at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/spec_fetcher.rb:1 require at org/jruby/RubyKernel.java:991 require at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:36 (root) at /Users/blake/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/spec_fetcher.rb:307 (root) at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/source.rb:1 (root) at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/source.rb:4 (root) at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/dsl.rb:1 initialize at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/dsl.rb:19 evaluate at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/dsl.rb:6 build at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler/definition.rb:18 definition at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler.rb:135 require at org/jruby/RubyKernel.java:991 load at /Users/blake/.rvm/gems/jruby-1.7.0.preview1@global/gems/bundler-1.1.3/lib/bundler.rb:123 jruby-1.7.0.preview1 :001 > Should this be fixed in preview1?
          Hide
          Charles Oliver Nutter added a comment -

          Have not seen this in a long time; calling it fixed.

          Show
          Charles Oliver Nutter added a comment - Have not seen this in a long time; calling it fixed.

            People

            • Assignee:
              Charles Oliver Nutter
              Reporter:
              Hiroshi Nakamura
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: