Issue #4911 has been updated by Brice Figureau.
After discussing with R.I it appears that a file ending in .cc triggered the problem. RDoc has a C parser that is triggered for .c,.cc, .cpp, etc files. In this case our own puppet rdoc parser is not triggered and later on, when we try to dump the documentation we receive a TopLevel and not a PuppetTopLevel. The former doesn't support the global method, thus the error. ---------------------------------------- Bug #4911: puppet doc fails with: undefined method `global' https://projects.puppetlabs.com/issues/4911 Author: R.I. Pienaar aka Volcane Status: Accepted Priority: Normal Assignee: Markus Roberts Category: Target version: queued Affected version: 0.25.0 Keywords: Branch: With an empty site.pp and a bunch of modules in the location I get: <pre> $ git checkout 2.6.2rc1; cd puppet HEAD is now at 917c520... Incremented version to 2.6.2 $ RUBYLIB=lib bin/puppet doc --mode rdoc --modulepath=/home/rip/manifests/modules --manifest=/home/rip/manifests/modules/site.pp --trace --debug /usr/lib/ruby/1.8/rdoc/dot/dot.rb:28: warning: already initialized constant NODE_OPTS /usr/lib/ruby/1.8/rdoc/dot/dot.rb:46: warning: already initialized constant EDGE_OPTS /usr/lib/ruby/1.8/rdoc/dot/dot.rb:76: warning: already initialized constant GRAPH_OPTS <snip> info: rdoc: scanning /home/rip/manifests/modules/greylistd/manifests/install.pp debug: rdoc: testing /home/rip/manifests/modules/greylistd/manifests/install.pp debug: rdoc: module greylistd into /home/rip/manifests/modules ? debug: rdoc: found module greylistd debug: rdoc: scanning for greylistd debug: rdoc: scanning manifest debug: rdoc: found new class greylistd::install debug: found realize: Package["greylistd"] ./lib/puppet/util/rdoc/generators/puppet_generator.rb:300:in `main_url' ./lib/puppet/util/rdoc/generators/puppet_generator.rb:299:in `each' ./lib/puppet/util/rdoc/generators/puppet_generator.rb:299:in `main_url' ./lib/puppet/util/rdoc/generators/puppet_generator.rb:199:in `gen_top_index' ./lib/puppet/util/rdoc/generators/puppet_generator.rb:183:in `gen_file_index' /usr/lib/ruby/1.8/rdoc/generators/html_generator.rb:1279:in `generate_html' ./lib/puppet/util/rdoc/generators/puppet_generator.rb:70:in `generate_html' /usr/lib/ruby/1.8/rdoc/generators/html_generator.rb:1197:in `generate' /usr/lib/ruby/1.8/rdoc/rdoc.rb:284:in `document' ./lib/puppet/util/rdoc.rb:35:in `rdoc' ./lib/puppet/application/doc.rb:85:in `rdoc' ./lib/puppet/application/doc.rb:59:in `send' ./lib/puppet/application/doc.rb:59:in `run_command' ./lib/puppet/application.rb:300:in `run' ./lib/puppet/application.rb:397:in `exit_on_fail' ./lib/puppet/application.rb:300:in `run' ./lib/puppet/util/command_line.rb:55:in `execute' bin/puppet:4 Could not generate documentation: undefined method `global' for #<RDoc::TopLevel:0x2b7e453e2f58> </pre> This took a long time to get to this point and did create a load of html in the doc directory though it didn't finish as there's no overall index for example - lots of modules have been documented though. If I run it with --debug I see it's scanning a lot of my .rb files that are in files of modules, if I rm all of those .rb files same error so that's probably a redherring. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.
