[Rubygems-developers] WARNINGS

Eric Hodel drbrain at segment7.net
Fri Feb 1 05:22:25 EST 2008

On Jan 31, 2008, at 17:33 PM, Mark Hubbart wrote:
> On Jan 31, 2008 2:23 PM, Eric Hodel <drbrain at segment7.net> wrote:
>> On Jan 30, 2008, at 13:10 PM, Trans wrote:
>>> On Jan 30, 12:48 pm, "Luis Lavena" <luislav... at gmail.com> wrote:
>>>> On Jan 30, 2008 3:43 PM, Trans <transf... at gmail.com> wrote:
>>>>> Why is Rubygems now issuing warnings when building, eg.
>>>>> WARNING:  no rubyforge_project specified
>>>>> WARNING:  RDoc will not be generated (has_rdoc == false)
>>>>> I've never seen it do this before. How to I silence it? (Using  
>>>>> ruby,
>>>>> not command line).
>>>> These warnings where introduced due bad gem specifications.
>>>> Setting the correct values in the gem specification will silent
>>>> these warnings.
>>> That's not so. The has_rdoc is set to false for a reason.
>> Then you're a bad person.  Not generating RDoc/ri is hostile to your
>> users.
> harsh much?

No.  Little is more annoying than running `gem server` or `ri` when  
I'm stuck on a problem and finding out that I have to trudge through  
source to figure out how to use a library because the author decided  
to deny me even the luxury of a class and method list.

> Reasons you might not want to generate RDoc for a particular gem:
> - Your interface is already documented. Say you write a lib that
> speeds up the use of Ruby's built-in complex class. If there's nothing
> but a speed improvement, why re-document the methods?
> - There is no interface to document. Perhaps your library does magic
> stuff in the background (say, logging performance stats), needing no
> method calls whatsoever.

There isn't even have a README?  That's hostile.

> - Your entire interface is dynamic, and has no set method calls. Maybe
> you prefer to explain it on a website.

Then I need an internet connection.  I don't always have one.  Also  

> - Some other reason, at the choice of the developer. Complain to them
> if they're wrong.

RubyGems is complaining to the developer in the form of a warning.

> Anyway, if it's always bad to not generate rdoc/ri, they should simply
> take the flag out.

Which is why it warns, but does not force generation of RDoc.

>>> Plus one might not have a rubyforge project.
>> There's an "orphans" project on rubyforge for gems that are lacking a
>> real project.  If you're building an internal gem, I think you can
>> deal with it.
> The "real" project could be on sourceforge.org, or code.google.com.

So you get a warning.

> But if a project name is that important, maybe rubygems should insert
> the default one (the "orphans" project) whenever none is specified.

This would be wrong, since the gem may never show up on rubyforge.

> Anyway, it seems like these warnings should be given when building the
> gem, not while installing it.

These warnings are not generated at install time.

More information about the Rubygems-developers mailing list