On Jun 28, 2009, at 9:52 AM, Brice Figureau wrote:
>
> On 28/06/09 15:42, Luke Kanies wrote:
>> On Jun 28, 2009, at 7:34 AM, Brice Figureau wrote:
>>
>>> It could happend that we were generating doc for subclasses
>>> before classes, in which case we were forgotting some
>>> parent class instance and recreating them.
>>> We ended up generating doc for some classes multiple times, from
>>> which some were missing documentation.
>>> The fix is to sort the parsed classes alphabetically, which auto-
>>> matically puts enclosing class before enclosed classes.
>>
>> This works for scoped classes, but it doesn't actually work for
>> subclasses that aren't in the same scope, right?
>>
>> That is, doing:
>>
>> class foo { }
>>
>> class bar inherits foo {}
>>
>> will break this again, right?
>
> No, this case is still working fine (just checked to be sure) because
> when we find a parent class we don't generate the documentation
> immediatly, we just create a kind of dangling link in RDoc.
> This link will be resolved later when we manage "foo".
> What was confusing for Rdoc was finding a parent in the scope that
> wasn't yet created.
> Because RDoc in ruby mode, scans the files from top to bottom, so they
> get the scope in the correct order, unlike in puppet mode where I was
> giving the class in a completely unordered mode.
I see.
At some point we almost need to build a dependency graph of the
classes. It'd be easy enough. I just don't know if there's a clear
benefit, I guess.
--
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---