Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid RDoc dependency #2483
In stable versions of RubyGems, it was possible to install gems without RDoc available:
Yes, it complained a bit, but the installation of gem was successful. With
However, for RubyGems 3.0.0.beta2, the same scenario fails:
This is very likely due to #2235. You might admit that RDoc is now part of StdLib, but IMO, this interdependency is something, what should be avoided at all cost. Because now, RDoc is a dependency of RubyGems while RubyGems is a dependency of RDoc, which makes nice unbreakable circular dependency. In the end, while the StdLib will appear as a bunch of independent libraries, it won't be possible to separate them.
Now I wonder how to solve this issue. Thinking about it, I believe that the best option is to revert #2235 and remove the https://github.com/ruby/rdoc/blob/master/lib/rdoc/rubygems_hook.rb from RDoc. I don't understand how and why it got into RDoc, but it feels wrong. RubyGems is using RDoc, RubyGems is RDoc client, not the opposite way. @hsbt thoughts?
This file https://github.com/rubygems/rubygems/blob/master/lib/rubygems/rdoc.rb contains following code
begin require 'rdoc/rubygems_hook' module Gem RDoc = ::RDoc::RubygemsHook end rescue LoadError end Gem.done_installing(&Gem::RDoc.method(:generation_hook))
begin require 'rdoc/rubygems_hook' module Gem RDoc = ::RDoc::RubygemsHook end Gem.done_installing(&Gem::RDoc.method(:generation_hook)) rescue LoadError end