Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Bug: yardoc gets namespace for inheritance wrong
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Morus Walter  
View profile  
 More options Jun 18 2012, 5:58 am
From: Morus Walter <morus.wal...@gmail.com>
Date: Mon, 18 Jun 2012 02:58:02 -0700 (PDT)
Local: Mon, Jun 18 2012 5:58 am
Subject: Bug: yardoc gets namespace for inheritance wrong
Hi,

for a set of classes
app/base.rb:
  class Base
  end
app/sub/base.rb:
  module Sub
    class Base
    end
  end
and
app/sub/foo.rb:
  module Sub
    class Foo < Base
    end
  end

yardoc creates documentation where Foo inherits from ::Base not
Sub::Base.
It's easy to work around using class Base < Sub::Base but it would be
nicer if yardoc picked the right base class.

Processing order seems to be relevant as well. In my large real world
use case, I had a case where one Foo-like class went ok while another
failed. I was not able to reproduce that in a short sample though.

best
  Morus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Loren Segal  
View profile  
 More options Jun 18 2012, 11:52 am
From: Loren Segal <lse...@soen.ca>
Date: Mon, 18 Jun 2012 11:52:40 -0400
Local: Mon, Jun 18 2012 11:52 am
Subject: Re: [YARD] Bug: yardoc gets namespace for inheritance wrong
Hi,

On 6/18/2012 5:58 AM, Morus Walter wrote:

This is not a bug, but expected behaviour. Processing order is in fact
relevant here, since YARD doesn't know about Sub::Base until sub/base.rb
is parsed. YARD is picking the only matching class it has recognized so
far. You can have YARD parse that file before the rest by adding
app/sub/base.rb before 'app/**/*.rb' in your file glob list.

Loren


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Morus Walter  
View profile  
 More options Jun 19 2012, 1:29 am
From: Morus Walter <morus.wal...@gmail.com>
Date: Mon, 18 Jun 2012 22:29:42 -0700 (PDT)
Local: Tues, Jun 19 2012 1:29 am
Subject: Re: Bug: yardoc gets namespace for inheritance wrong
Hi Loren,

thanks for your fast response (and thanks a lot for yardoc of course)

> This is not a bug, but expected behaviour. Processing order is in fact
> relevant here, since YARD doesn't know about Sub::Base until sub/base.rb
> is parsed. YARD is picking the only matching class it has recognized so
> far. You can have YARD parse that file before the rest by adding
> app/sub/base.rb before 'app/**/*.rb' in your file glob list.

I see.

I guess inheriting only from fully qualified class names is easier
then.

best
  Morus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »