After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688204 - undocumented enum values missing in indexes
undocumented enum values missing in indexes
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.19
Other Linux
: Normal normal
: 1.19
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-12 20:09 UTC by Yeti
Modified: 2012-11-13 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (5.00 KB, patch)
2012-11-13 11:54 UTC, Yeti
committed Details | Review

Description Yeti 2012-11-12 20:09:33 UTC
Gtk+ devhelp and index.sgml files lack entries for values from GtkTextDirection, GtkIconSize, GtkScrollType, ... enums.  This can be observed, among other things, on a large number of cross-link resolution failure warnings during documentation generation.  And, of course, the enum values are not searchable in develp either (the enum type itself is).

Values from other enums work fine, for instance values from GtkOrientation, GtkPositionType, ...  Apparently, the difference is that the former are undocumented while the latter are documented (but I have not confirmed it yet).
Comment 1 Yeti 2012-11-12 20:14:07 UTC
Maybe I should have added that the enums appear normally in the HTML docs, including all the values.  They are missing just from the indexes.  So it is not a source code markup issue; something in gtk-doc decides to avoid indexing undocumented enum values.
Comment 2 Yeti 2012-11-12 22:24:18 UTC
The cause is clear: What gets an XML id and can be cross-referenced?  Items in the <variablelist> documenting individual values.

But if no value is documented the [useless] <variablelist> is not emitted at all.

The unclear part is how to fix it.

I would not mind emitting even useless <variablelist>s for completely undocumented enums.  I do not tend to have any.  But others may differ.

So another possibility is to emit a bunch of <anchor>s just after the <indexterm> of the enum type.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2012-11-13 08:53:45 UTC
Good observation. I would also just emit a bunch of empty <variablelist>s. This will at least help people get to the doc for the enum itself.

I never noticed as my own docs are always 100% complete :)
Comment 4 Yeti 2012-11-13 11:54:49 UTC
Created attachment 228873 [details] [review]
patch

This patch should do the trick (most of the changes are indentation level shifts).  The handling of enum values becomes somewhat inconsistent with fields of other symbols because their tables are still omitted completely if none is documented.  However, individual enum values are globally visible symbols themselves -- unlike, for instance function arguments.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2012-11-13 17:18:35 UTC
Comment on attachment 228873 [details] [review]
patch

thanks for the patch, even though a git style one would have been easier to apply