[Rubygems-developers] --rdoc option does not have an effect

Chad Fowler chad at chadfowler.com
Fri Jun 10 07:33:54 EDT 2005


On 10-Jun-05, at 12:58 AM, Gavin Sinclair wrote:

> On Monday, June 6, 2005, 4:06:58 PM, Eric wrote:
>
>
>>> EH> If a gem has no rdoc (xml-simple), rubygems can't suddenly  
>>> make it
>>> EH> appear.
>>>
>>> Sorry of course it can. It will just list the things dectected by
>>> analysing the source code. It is only a problem when the is code  
>>> is a
>>> compiled binary library but this is not the case in my examples.
>>>
>>> Thats why there is an option like the force rdoc generation.
>>> And it does not work (also tried the  "gem rdoc xml-simple"  
>>> command).
>>> I must do this manually by calling "rdoc <gemlibpath>".
>>>
>>> So it is very clear that this is an Error in RubyGems.
>>>
>
>
>> lib/rubygems/doc_manager.rb disagrees:
>>
>
>
>>      def generate_rdoc
>>        return if @spec.has_rdoc == false
>>
>
>
>> and I disagree that rubygems should ever second-guess the gem author.
>>
>
> I think --rdoc should force RDoc generation.  That's not
> second-guessing the author; it's just saying "I want to see the RDoc
> output, please."  That's none of the author's business.
>
> The "rdoc" spec is pretty useless at the moment.  Few people appear to
> take any care in setting it.  I see it as being for information only
> (which may or may not be accurate, just like homepage, for instance).
>
>

Actually, the rdoc spec is being used to avoid running rdoc on gems that
really have no rdoc (like "rails").  There was a case where rdoc was  
crashing on one of these
gems, and the author used the rdoc spec attribute to explicitly stop  
rdoc from running.

Chad

>



More information about the Rubygems-developers mailing list