Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while generating docs for ox #753

Closed
Kapeli opened this issue Mar 15, 2014 · 1 comment
Closed

Error while generating docs for ox #753

Kapeli opened this issue Mar 15, 2014 · 1 comment

Comments

@Kapeli
Copy link

Kapeli commented Mar 15, 2014

~/Desktop/ox-2.1.1 » yard --backtrace
[warn]: Unknown tag @column in file `lib/ox/sax.rb` near line 52
[error]: Unhandled exception in YARD::Handlers::C::ClassHandler:
[error]:   in `ext/ox/sax_as.c`:245:

    245: ox_sax_value_class = rb_define_class_under(sax_module, "Value", rb_cObject);

[error]: NoMethodError: undefined method `root?' for nil:NilClass
[error]: Stack trace:
    /Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/base.rb:561:in `ensure_loaded!'
    /Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/base.rb:428:in `register_ensure_loaded'
    /Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/base.rb:407:in `block in register'
    /Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/base.rb:405:in `each'
    /Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/base.rb:405:in `register'
    /Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/handler_methods.rb:11:in `handle_class'

Files:          15
Modules:         2 (    0 undocumented)
Classes:        15 (    2 undocumented)
Constants:       1 (    0 undocumented)
Methods:        30 (    1 undocumented)
 93.75% documented
@Kapeli Kapeli mentioned this issue Mar 15, 2014
@lsegal lsegal added this to the 3/22 Todo milestone Mar 22, 2014
@lsegal lsegal closed this as completed in d420e94 Mar 22, 2014
@lsegal
Copy link
Owner

lsegal commented Mar 22, 2014

I've made a slight change to the above fix to report these issues as undocumentable errors (warnings, really) instead. It turns out that the way Ox defines that Value class is done in such a way that confuses YARD about what the parent module/class is. Ideally we should report these so libraries like Ox can redefine or give extra hints to YARD/RDoc to declare the class properly (RDoc can't find this class either).

lsegal added a commit that referenced this issue Mar 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants