Bugs item #28844, was opened at 2011-01-09 17:24
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28844&group_id=126

Category: #gem and #require methods
Group: v1.3.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Erik Hollensbe (erikh)
Assigned to: Nobody (None)
Summary: rubygems plugins, 1.9 and circular requires

Initial Comment:
I apologize in advance if this is confusing.

I'm not entirely sure if this is gem_prelude's fault or rubygems's or even ruby 
proper's fault, but here goes:

http://www.gem-testers.org/gems/rubygems-test/v/0.2.1/test_results/2

If you carefully examine the stack trace, you'll see that the rdoc plugin is 
being pulled in, then hanna is being pulled in. What happens in hanna is that 
rubygems is pulled in, ergo our problem. This is all done in from a rake 
process spawned by rubygems-test which uses open4 which in 1.9 uses threads, so 
threading may be a part of the issue here.

This issue does not exhibit in 1.8, but it uses fork there. I was unable to 
test in RG 1.4 because of the obvious.

I was able to fix this in rubygems-test 0.2.1 for the 'gem test' provider. The 
commit below is the fix.

https://github.com/rubygems/rubygems-test/commit/72b0e136889fcd2509bb040de3fe9220c4b8bc13

You can see that I abuse autoload there to ensure that any rubygems 
dependencies (and YAML to be safe)  are only loaded once. This is because of 
the above issue. These patches fix it but not for rdoc and (I presume) other 
plugins.

What probably needs to happen is some beyond-the-call-of-duty $:/$" inspection 
before plugin load runs or to somehow load plugins with autoload (I don't think 
this is possible though). Obviously I'm deferring to your experience.

Please feel free to tell me where to stick this bug report if it does not 
belong here, I'm just convinced after the discrete repros that it at least gets 
close to starting in rubygems.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28844&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to