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 676685 - Allow to order functions without using $MODULE-sections.txt
Allow to order functions without using $MODULE-sections.txt
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.19
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-23 20:06 UTC by Sébastien Granjoux
Modified: 2012-05-24 17:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sébastien Granjoux 2012-05-23 20:06:17 UTC
Currently, it's possible to generate a documentation without writing the sections.txt file using the one automatically generated by gtkdoc-scan.

But it is not possible to define the order of the functions. They are in alphabetical order which is often not the best one. It would be better if they can use by example the order of the declarations in the header file.
Comment 1 Yeti 2012-05-23 20:58:25 UTC
This must be a recent change, they used to be ordered the same way as in the header -- which *is* already a method how to define the order.  I would really appreciate having for instance the corresponding setter and getter next to each other in the documentation (as they are in the headers).  I hope I will not have to write a script for parsing the headers and reordering the section file accordingly to get the native order again...
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2012-05-23 21:02:32 UTC
The sorting is done in gtkdoc-scan.in:
    # sort the symbols
    $list=join("\n",sort(split("\n",$list)))."\n";

and was added in this change
commit 84b58c06e1214c984f12af4067b6520d16707fe1
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Thu Aug 25 19:45:26 2011 +0200

    scan: make the generated section file more deterministic
    
    Sort the section and the symbols with the section.

The idea was to make the generated files more stable. Although it'd probably work to only sort the sections as such, but not the content.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2012-05-23 21:12:17 UTC
commit 2a6b01253fe41412172a60f26705114b953d0a95
Author: Stefan Sauer <ensonic@users.sf.net>
Date:   Wed May 23 23:10:01 2012 +0200

    gtkdoc-scan: revert the sorting of symbols
    
    Developers can arrange symbols by shuffling them inside the header file.
    Fixes #676685.
Comment 4 Sébastien Granjoux 2012-05-24 17:57:27 UTC
Thank you, that's a really fast fix.