libgit2 / docurium

Doxygen replacement for the libgit2 project
http://libgit2.github.com/libgit2
MIT License
158 stars 25 forks source link

Basic template (api.docurium) fails to generate documentation #25

Closed papriwalprateek closed 8 years ago

papriwalprateek commented 8 years ago

Using cm gen, I generated a basic api.docurium template. I edited it for ligit2 project

{
 "name":   "libgit2",
 "github": "libgit2/libgit2",
 "input":  "include/git2",
 "prefix": "git_",
 "branch": "gh-pages"
}

But then, when I run docurium over libgit2/libgit2 project using the above template it fails with the following error.

root@9e8cfa6ab85c:~/libgit2# cm doc api.docurium 
/usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rocco-0.8.2/lib/rocco.rb:54: warning: Insecure world writable dir /go/bin in PATH, mode 040777
checking for llvm-config... yes
Using libclang: /usr/lib/llvm-3.5/lib/libclang.so
Clang version detected: [3, 5]
/usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:346:in `read_tree': wrong argument type nil (expected Data) (TypeError)
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:346:in `read_subtree'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:117:in `generate_doc_for'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:138:in `block (2 levels) in generate_docs'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:135:in `fork'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:135:in `block in generate_docs'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:131:in `each'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:131:in `generate_docs'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium/cli.rb:6:in `doc'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/bin/cm:18:in `block (2 levels) in <top (required)>'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/command_support.rb:126:in `call'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/command_support.rb:126:in `execute'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:296:in `block in call_command'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:309:in `call'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:309:in `call_command'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:83:in `run'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/bin/cm:41:in `<top (required)>'
    from /usr/local/rbenv/versions/2.2.3/bin/cm:23:in `load'
    from /usr/local/rbenv/versions/2.2.3/bin/cm:23:in `<main>'
/usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:346:in `read_tree': wrong argument type nil (expected Data) (TypeError)
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:346:in `read_subtree'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:117:in `generate_doc_for'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:138:in `block (2 levels) in generate_docs'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:135:in `fork'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:135:in `block in generate_docs'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:131:in `each'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:131:in `generate_docs'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium/cli.rb:6:in `doc'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/bin/cm:18:in `block (2 levels) in <top (required)>'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/command_support.rb:126:in `call'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/command_support.rb:126:in `execute'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:296:in `block in call_command'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:309:in `call'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:309:in `call_command'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:83:in `run'
/usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:346:in `read_tree':     from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/bin/cm:41:in `<top (required)>'
    from /usr/local/rbenv/versions/2.2.3/bin/cm:23:in `load'
wrong argument type nil (expected Data) (TypeError)
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:346:in `read_subtree'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:117:in `generate_doc_for'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:138:in `block (2 levels) in generate_docs'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:135:in `fork'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:135:in `block in generate_docs'
    from /usr/local/rbenv/versions/2.2.3/bin/cm:23:in `<main>'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:131:in `each'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:131:in `generate_docs'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium/cli.rb:6:in `doc'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/bin/cm:18:in `block (2 levels) in <top (required)>'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/command_support.rb:126:in `call'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/command_support.rb:126:in `execute'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:296:in `block in call_command'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:309:in `call'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:309:in `call_command'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/gli-2.14.0/lib/gli/app_support.rb:83:in `run'
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/bin/cm:41:in `<top (required)>'
    from /usr/local/rbenv/versions/2.2.3/bin/cm:23:in `load'
    from /usr/local/rbenv/versions/2.2.3/bin/cm:23:in `<main>'
/usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:161:in `load': marshal data too short (ArgumentError)
    from /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/docurium-0.5.0/lib/docurium.rb:161:in `block (2 levels) in generate_docs'

But when I use the example config file as specified in README, it works fine. Could you please clarify on the following. And it would also be good to have a note in the README.

papriwalprateek commented 8 years ago

I figured out what the legacy option is doing. It actually is taking care for any changes in input path in the legacy (previous) versions. I am closing the issue. But it would be great to add some information about the config file options in the README.