GNOME Bugzilla – Bug 776536
valadoc not generating any namespace/classes/etc for complete geary source tree
Last modified: 2016-12-30 07:07:15 UTC
Running both valadoc master/0.35 with valac 0.34 on the Geary source tree produces an empty package: > git clone https://git.gnome.org/browse/geary && cd geary > find src/engine -name \*.vala | xargs valadoc -b src -o valadoc --force --doclet=html --driver=0.34 --package-name=geary-engine-0.12 --package-version=0.12 --profile=gobject-2.0 --target-glib=2.42 --pkg=gee-0.8 --pkg=gio-2.0 --pkg=gmime-2.6 --pkg=libxml-2.0 --pkg=sqlite3 --vapidir=bindings/vapi Running it with a limited subset of the source tree does produce a package containing the subset, e.g: > valadoc -b src -o valadoc --force --doclet=html --driver=0.34 --package-name=geary-engine-0.12 --package-version=0.12 --profile=gobject-2.0 --target-glib=2.42 --pkg=gee-0.8 --pkg=gio-2.0 --pkg=gmime-2.6 --pkg=libxml-2.0 --pkg=sqlite3 --vapidir=bindings/vapi src/engine/api/geary-special-folder-type.vala These two commands are identical except for the source code arguments. No warnings are produced for either, and the command successfully completes in both cases. After adding some debugging to valadoc, in the both cases the TreeBuilder successfully adds the specified source files to its Vala.CodeContext, and visits the Geary namespace and nodes below it, however only in the latter does the HTML doclet actually visit them.
Did some more digging, turns out this is caused by Bug 774669 - Valadoc.Api.Node::has_visible_children was calling per_type_children.keys.to_array, which was returning an array containing incorrect values, and hence the root namespace didn't appear to contain any child namespaces. Marking as a dupe. *** This bug has been marked as a duplicate of bug 774669 ***