lsegal / yard

YARD is a Ruby Documentation tool. The Y stands for "Yay!"
http://yardoc.org
MIT License
1.94k stars 397 forks source link

Crash on #440

Closed FlyboyArt closed 12 years ago

FlyboyArt commented 12 years ago

I issue the command:

yard gems

and it crashes.

All the info I have to pass along is this:

warn: Load Order / Name Resolution Problem on State:

warn: Something is trying to call child on object State before it has been recognized. warn: This error usually means that you need to modify the order in which you parse files warn: so that State is parsed before methods or other objects attempt to access it.

warn: YARD will recover from this error and continue to parse but you may have problems warn: with your generated documentation. You should probably fix this.

/Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/code_objects/proxy.rb:218:in rescue in method_missing': Proxy cannot call method #child on object 'State' (YARD::CodeObjects::ProxyMethodError) from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/code_objects/proxy.rb:215:inmethod_missing' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/parser/c_parser.rb:108:in handle_alias' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/parser/c_parser.rb:415:inblock in parse_aliases' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/parser/c_parser.rb:408:in scan' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/parser/c_parser.rb:408:inparse_aliases' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/parser/c_parser.rb:18:in parse' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/parser/source_parser.rb:438:inparse' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/parser/source_parser.rb:361:in parse_in_order' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/parser/source_parser.rb:89:inblock in parse' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/logging.rb:66:in enter_level' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/parser/source_parser.rb:88:inparse' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard.rb:18:in parse' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/cli/yardoc.rb:215:inrun' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/cli/command.rb:13:in run' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/cli/gems.rb:41:inblock in build_gems' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/cli/gems.rb:29:in each' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/cli/gems.rb:29:inbuild_gems' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/cli/gems.rb:20:in run' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/cli/command.rb:13:inrun' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/cli/command_parser.rb:68:in run' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/lib/yard/cli/command_parser.rb:50:inrun' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/gems/yard-0.7.4/bin/yard:4:in <top (required)>' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/bin/yard:19:inload' from /Users/artair/.rvm/gems/ruby-1.9.2-p180/bin/yard:19:in `

lsegal commented 12 years ago

This is not a crash, it's just a parsing error. Parsing errors can happen on some gems. If you run yard with --debug or --verbose you can narrow down which gem causes the problem and maybe there is an underlying bug that can be solved.