This question was flagged as unclear what I'm asking. For clarity, I am asking for a workaround to get this document generator working properly against my codebase. (perhaps splitting the job into batches? Is that possible with cldocs? Perhaps issuing different command line options? Perhaps my invocation is wrong or misguided?)
I have filed a bug against the project that you can find here with some additional information about my environment (including a full command line located here: http://pastebin.com/JxWf9hRB).
https://github.com/jessevdk/cldoc/issues/73
Original Question:
I'm investigating using cldocs for automated documentation. However, it's crashing on my codebase, with the following error:
Traceback (most recent call last):
File "/usr/local/bin/cldoc", line 9, in <module>
load_entry_point('cldoc==1.6', 'console_scripts', 'cldoc')()
File "/usr/local/lib/python2.7/site-packages/cldoc/__init__.py", line 57, in run
run_generate(rest)
File "/usr/local/lib/python2.7/site-packages/cldoc/__init__.py", line 27, in run_generate
cmdgenerate.run(args)
File "/usr/local/lib/python2.7/site-packages/cldoc/cmdgenerate.py", line 151, in run
run_generate(t, opts)
File "/usr/local/lib/python2.7/site-packages/cldoc/cmdgenerate.py", line 33, in run_generate
generator.generate(xmlout)
File "/usr/local/lib/python2.7/site-packages/cldoc/generators/xml.py", line 55, in generate
Generator.generate(self, outdir)
File "/usr/local/lib/python2.7/site-packages/cldoc/generators/generator.py", line 22, in generate
self.generate_node(node)
File "/usr/local/lib/python2.7/site-packages/cldoc/generators/xml.py", line 543, in generate_node
self.generate_page(node)
File "/usr/local/lib/python2.7/site-packages/cldoc/generators/xml.py", line 510, in generate_page
elem = self.node_to_xml(node)
File "/usr/local/lib/python2.7/site-packages/cldoc/generators/xml.py", line 496, in node_to_xml
chelem = self.node_to_xml(child)
File "/usr/local/lib/python2.7/site-packages/cldoc/generators/xml.py", line 485, in node_to_xml
self.call_type_specific(node, elem, 'to_xml')
File "/usr/local/lib/python2.7/site-packages/cldoc/generators/xml.py", line 465, in call_type_specific
getattr(self, nm)(node, elem)
File "/usr/local/lib/python2.7/site-packages/cldoc/generators/xml.py", line 273, in method_to_xml
if len(node.override) > 0:
File "/usr/local/lib/python2.7/site-packages/cldoc/nodes/method.py", line 43, in override
bases = list(self.parent.bases)
AttributeError: 'Namespace' object has no attribute 'bases'
EDIT:
After a long while, I have been able to pare it down to a minimal example.
template<typename T>
struct Foo {
int baz(T const& t) const { }
};
template<typename T, int N>
class Bar { };
template<typename T, int N>
struct Foo<Bar<T, N>> {
int baz(Bar<T, N> const& a) const;
};
template<typename T, int N>
int Foo<Bar<T, N>>::baz(Bar<T, N> const& a) const { }
Whereas this works:
template<typename T>
struct Foo {
int baz(T const& t) const { }
};
template<typename T, int N>
class Bar { };
template<typename T, int N>
struct Foo<Bar<T, N>> {
int baz(Bar<T, N> const& a) const { }
};