2 The TODO list for the gtk-doc project is at Bugzilla,
3 the bugtracking system of the GNOME project.
6 http://bugzilla.gnome.org/buglist.cgi?product=gtk-doc&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED
7 to see what is allready requested, or where you can help. :-)
9 To put an other request on the TODO list, visit
10 http://bugzilla.gnome.org/enter_bug.cgi?product=gtk-doc
13 http://live.gnome.org/DocumentationProject/GtkDocFuture
14 and join discussion about future features.
17 Developers can also add items here :)
19 = Less files to manually edit =
20 The goal is that we configure gtk-doc in configure.ac and Makefile.am and
21 document the code in the sources. Right no we also have to edit a bunch of extra
24 * $(DOC_MODULE)-docs.xml
25 * $(DOC_MODULE)-sections.txt
29 * using SCAN_OPTION="--rebuild-types" can be used to avoid maintaining the types
31 * we need to check if this works well for all kind of _types (e.g. boxed)
32 https://bugzilla.gnome.org/show_bug.cgi?id=605025
35 https://bugzilla.gnome.org/show_bug.cgi?id=646094
37 * using SCAN_OPTION="--rebuild-sections" can be used to use the audogenerated
39 * when scanning a header file, everything of the header and the respective .c
40 file will be put to one section
41 * symbols can be hidden using __GTK_DOC_IGNORE__
43 * we need comment markup to override the section
44 e.g.: " * InSection: xxxx"
45 this needs gtkdoc-mkdb::ScanSourceFile to understand a new tag, which
46 otherwise would appear as verbatim in the sources
47 * if one has "@InSection: xxxx" in a section comment we could patch the
48 main.xml file and insert then xi:include line (would possibly rely on a
49 special comment-pair there, we might also need to rewrite these
50 auto-generated xi:includes everytime as the placements could have been
51 changed, or we have a xi:inlcude for each chapter, that we regenerate).
52 * we need a way to specify subsections (Standart, Private)
53 this could be done in the SECTION comment
54 e.g.: "@HideSymbols: <list-of-symbols-to-hide>
55 * we could allow to have a SUBSECTION:xxx comment block too
56 but then we list all the symbols here to override the auto-section placement
57 * if we want to avoid the "InSection in symbol docs we could also have
58 e.g.: "@ExtraSymbols: <list-of-symbols-to-include>
59 * documented symbols that are in a file without section comment and do not
60 appear in "@ExtraSymbols", "@HideSymbols" would go to unused.txt
61 * shall we deprecated the unused sub-sections?
62 * can we have both at the same time (for migration)
63 * yes, read section-file first and add/override from inline comments
66 = More abbreviations =
67 * expand urls (needds more work, see gtkdoc-mkdb : ExpandAbbreviations)
72 diff -u --exclude="Makefile*" docs docs-tmpl | diffstat
76 gtk-doc is using a makefile with several targets to get from sources to docs. It
77 uses makefile variables for configuration.
78 It might be easier to have a gtk-doc tool that can run the other gtk-doc tools
79 in the right order (ev. by importing them as modules). This could handle a few
80 things nicer that the makefiles don't do well. This would also make it easy to
81 run it manually or integrate into other build systems.
84 * gtkdoc-fixxref makefile targets use $HTML_DIR
85 * HTML_DIR: The directory where gtk-doc generated documentation is installed
86 it comes from gtk-doc.m4 (--with-html-dir) but has no default
87 * automake exports $htmldir which is by default:
88 ${prefix}/share/doc/${PACKAGE_TARNAME}
89 * the Makefile uses $(DESTDIR)$(TARGET_DIR)
90 where TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
91 http://www.gnu.org/software/libtool/manual/automake/DESTDIR.html
92 * gtkdoc does not know about module versions
93 * this is causing troubles when multiple library versions are installed
94 (gtk+-{2,3}, gstreamer-{0.8,0.10,1.0}
95 * right now gtk-doc is xreffing against any <module>/index.sgml found
96 * just using the one with a higher number won't work
100 We'd like to extend gtk-doc to understand conventions/features of gobject libs.
101 Ideally libs register their extension hooks, so that other libs that use these
102 libs can benefit from the extensions too.
104 == custom get_types collector ==
105 - the default method takes the types from a type file
106 - gstreamer plugin docs take a list of types from the gst plugin registry
108 == custom properties ==
109 - gtk has style and child properties
111 == extra gobject property flags ==
112 - gstreamer has 'controllable' properties
115 * http://sagehill.net/docbookxsl/index.html
117 * would be good to be able to have page titles as a concatenation of document
118 name and page name (gtk+:GtkWIdget)
120 http://bugzilla.gnome.org/show_bug.cgi?id=531572 : html-single
121 http://bugzilla.gnome.org/show_bug.cgi?id=466535 : pdf
122 http://bugzilla.gnome.org/show_bug.cgi?id=467488 : man
123 we need more configure options in gtk-doc.m4:
124 --(enable|disable)-gtk-doc-(html|pdf|man|html-single|rtf)
125 - html : enabled by default
126 - html-single : is single page html
128 xmllint --noout --xinclude --postvalid tester-docs.xml
129 xmllint --noout --postvalid tester-docs.fo --dtdvalid file://$HOME/download/fo.dtd
130 - fo.dtd : http://www.renderx.com/Tests/validator/fo.zip
132 xsltproc --nonet --xinclude -o gtk-docs.html /home/ensonic/projects/gtk-doc/gtk-doc-single.xsl gtk-docs.sgml
133 * need to check if we can pass the style-sheet class as a parameter (--stringparam gtkdoc.stylesheet=(chunk|docbook))
134 * we might also need to reflow some things, as gtk-doc.xsl also runs the devhelp/devhelp2 generation
135 - but then the urls in the devhelp file, refer to the chunked html anyway
138 Bugzilla has some requests for extra warnings. We should support a common
139 commandline option(s) in all tools to enable/disable the warnings. The makefiles
140 should pass the flags from an env-var (GTKDOC_OPTIONS). The env-var should be
141 used after the regular flags, so that the env-var can override hardcoded
142 settings (in Makefile.am).
144 Lets take this warning for the example:
145 "Symbol name not found at the start of the comment block."
147 Version 1: (template "warn-xxx!, warn-yyy!")
148 --warn-missing-symbol-at-comment-start
149 --no-warn-missing-symbol-at-comment-start
151 Version 2: (template "warn:s@")
152 -Wmissing-symbol-at-comment-start
153 -Wno-missing-symbol-at-comment-start
154 -warn missing-symbol-at-comment-start
155 -warn no-missing-symbol-at-comment-start
158 - 'deprecated' deprecating 'features'
159 - 'dummy-docs' check if symbol docs are very short and repeat mainly words
161 - possible xrefs (e.g. adding a # or () would make it a successful xref)
167 1) replace gtkdoc-scan/gtkdoc-scangobject by gtkdoc-gir and output the classical files or
168 patch gtkdoc-scan/gtkdoc-scangobject to output gir files
169 2) patch gtkdoc-mkdb to read stuff from gir instead of classical files
170 * if gir-files would have the comments too (they are getting this now):
171 * we could even drop scanning the sources
172 * IDEs could use the gir-files to show doc-tooltips for symbols
173 * we might need yet another makefile flavour to use gir files
175 * http://www.xml.com/pub/a/2001/04/18/perlxmlqstart1.html
178 * simmillar workflow to gettext
179 * add gtkdoc-mk??? to generate binding doc templates
180 * have c-comments there as comments
181 * when updating templates, mark sections that have changed as fuzzy
182 * add options to gtkdoc-mkdb to build docbook from those templates
184 * could we use the tmpl file mechanism?
185 * directory structure?
186 * we need to list the languages like ALL_LINGUAS for translations
187 * we need to create subdirs for binding docs, ideally we use one for 'C' as well
189 * devhelp files need a language attribute in the book-tag
190 language={C,C++,JavaScript,Perl,Python,...}
191 * devhelp could show a selector for the language
192 * need to get existing python/~mm docs to use it, gtk-doc could output
193 language=C for own docs
196 * need to install each book with a prefix
197 * would be good to have a language attribute in book tag to allow filter by language
198 * look at /usr/share/gtk-doc/html/pygobject/index.html
201 = external processors =
202 We need parametric, user definable macros.
203 |[ ... ]| - programlistings
204 |macro(arg1,arg2,...)[ ... ]| - call macro
205 - pass args as parameters (on the commandline)
206 - pass some gtk-doc vars in environment
207 (gtk-doc version, module, srcdir, buildir)
208 - content of [] on stdin or as a file
209 - get output on stdout or file
210 - and replace the macro with it
211 The changes could be made in gtkdoc-mkdb::ExpandAbbreviations()
213 |highlight(c)[...]| - highlight source code for a specific language (c)
214 - what will this output? preformatted html to be xincluded?
215 - we could have macros for each format, the docbook xml macro would leave
216 enough traces in the html so that a html macro can continue
217 |dot(svg)[...]| - format dot graph and include result as mediaobject (in svg format)
218 |ditta(svg)[...]| - parse ascii art and include result as mediaobject (in svg format)
219 - we need to generate a filename for the image or use anoter parameter
221 == where to define macros ==
222 * system wide and with the package, <prefix>/share/gtk-doc/macros, $(srcdir)
223 * prefix for custom macros?
224 * we could require stdin for input and stdout for output, the wrapper for the
225 actual tool can ensure the convention
230 if we highlight to html we get colors, we need to check what tags we should process though:
231 <pre class="programlisting"> is used for all code boxes.
232 <div class="informalexample"><pre class="programlisting"> is used for examples.
234 * in html we don't know the language anymore
236 * with source-highlight, constants and types are not markedup.
237 for types we might need to build an own lang file dynamically and include
238 /usr/share/source-highlight/c.lang
239 === |[ ... ]| does not allow setting the language ===
240 * check for vi/emacs/jedit modelines
241 jedit: http://www.jedit.org/users-guide/buffer-local.html
242 vim: http://vim.wikia.com/wiki/Modeline_magic
243 emacs: http://www.delorie.com/gnu/docs/emacs/emacs_486.html
244 * allow <!-- language="C" --> comments after |[
245 * we need to catch those when processing the docbook and expanding the |[
246 * require new macro syntax
248 == show inherited api ==
249 could we write small html files for each object for methods, signals and properties and then use iframes to combine those at runtime like in javadoc?
250 could we do that using javascript and some other magic?
255 * to document the api-life cycle we have: since, deprecated and stability:
256 * other things we might want to specify:
257 * multi-threading safety: mt-safe, use-with-lock <lock>
259 == protected scope ==
260 * we can have /* < protected > */ in classes
261 * we can have <SUBSECTION Protected> in -section.txt
262 * ideally we have Scope: {Public, Protected, Private} supported in doc comments
263 * there is a bug for gir, https://bugzilla.gnome.org/show_bug.cgi?id=594125
265 == wildcards in symbol names ==
266 Sometimes one defines a set of function and macros with very similar purpose, e.g.
267 READ_INT8, READ_INT16, READ_INT32. It would be great to allow documenting a symbol
268 READ_INT* instead of 3 docs which are copy'n'pasted anyway. In the output we will have
269 all matching declarations in one source listing. Multiple wildcards are okay.
272 = documentation best practises #518427 =
273 * we'd like offer a more complete skelleton
275 * docbook markup (part/chapter structure)
277 Suggested structure for api-docs.
278 Idea is to have more content that api reference. It would be good to have a
279 gnome-platform document in devhelp, so that we could xref that instead of
280 explaining 100 times how to use pkg-config.
284 * concepts / api / tools / tutorial / related tools
286 * overview / api / migation / tools
287 * qt reference docs in qt assistant
288 * classes / overview / tutorial&examples
291 * table with details (http://www.docbook.org/tdg/en/html/bookinfo.html)
292 (problem: what enclosing tag)
294 Copyright and Legalnotice
296 * homepage, mailing lists, irc channel
297 * repository, source releases, bugtracker
299 * introduction - what is is about
300 * concepts - explain basic ideas and terminology
301 * development - how to build and run, env-vars, different platforms
302 * api - classic api docs
303 * tutorial & examples - integrated to keep it up-to-date and cross referenced
304 * migration - how to for api changes, deprecations
305 * (releated) tools - tools part of the package or recommended for development
306 * indexes - api-index, depretations, new api since xxx
308 proposed structure in docbook xml:
312 <preface><title>Introduction</title>
315 <part label="I"><title>xxx Overview</title>
316 <xi:include href="building.xml" />
319 <reference label="II"><title>xxx Core Reference</title>
320 <xi:include href="xml/gtkmain.xml" />
323 <reference label="III"><title>xxx Object Reference</title>
324 <chapter><title>Object Hierarchy</title>
325 <xi:include href="xml/tree_index.sgml" />
332 some things to check:
333 * gtk,glib: can we make a <part> for the glosary and index's (according to docbook, yes)
334 should we use <appendix>? its like a chapter.
335 * gobject: uses a <preface> for introductions
336 * gobject: uses <reference> as a parent for the xi:includeed <refentry> docs
339 = extra link for symbols =
340 need options for configure:
341 --enable-gtk-doc-codesearch-links
342 --enable-gtk-doc-liveedit-links
343 == viewvc,cgit,... ==
344 - link to some online service for the code
345 - problem: most don't have local anchors for the symbols
346 - where to set the uri (in the document, like for online url)?
347 - what about a template URL containing a %s for the "path/file" or a special macro
348 http://svn.gnome.org/viewvc/gtk-doc/trunk/tests/gobject/src/gobject.c?view=markup
349 http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/src/lib/core/core.c?view=markup
350 - unfortunately we can't link to symbols (only lines)
351 - linking to files is difficult as in gtkdoc we have modules
354 - google (code) link : http://www.google.com/codesearch?q=g_object_unref
356 The idea is to have an 'edit' link in an online version of the docs (build from
357 head development version) per doc-entry (symbols and section).
358 The link goes to a cgi and that gets following parameters: docmodule,symbol.
359 E.g. http://library.gnome.org/devel/references/edit?docmodule=glib&symbol=g_new
360 The cgi would need a hashmap to get from docmodule to the way to check it out
361 (ideally it has a recent checkout and only updates it).
363 - signal that this has been edited already?
364 - support for xi:included examples
365 - updating the checkout could be slow
368 = fix missing since docs =
369 cd gstreamer/gstreamer/docs/gst
370 gtkdoc-mkdb --module=gstreamer --source-dir=../../gst --outputsymbolswithoutsince
371 cd gstreamer/gstreamer/src
374 git bisect bad RELEASE-0_10_0
375 git bisect run script.sh
380 grep "gst_caps_is_always_compatible" tags
384 - timestamp each step
386 - try CFLAGS=-O0 for compiling the scanner, no need to optimize it
387 CFLAGS="-O0" make check >make.log
390 http://docbook2x.sourceforge.net/latest/doc/performance.html
391 - play with xsltproc --profile --verbose --timing
392 cd tests/gobject/docs/html
393 time /usr/bin/xsltproc 2>xslt.log --profile --verbose --timing --path /home/ensonic/projects/gnome/gtk-doc/gtk-doc/tests/gobject/docs --nonet --xinclude --stringparam gtkdoc.bookname tester --stringparam gtkdoc.version 1.14 /home/ensonic/projects/gnome/gtk-doc/gtk-doc/gtk-doc.xsl ../tester-docs.xml
394 - l10n.language is slow
395 bug: https://sourceforge.net/tracker/index.php?func=detail&aid=2918673&group_id=21935&atid=373750
396 see: http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg05412.html
397 - overide l10n.language
400 2m15.221s 1m58.740s 0m1.456s
402 1m55.480s 1m44.296s 0m2.125s
403 - override many template related to gentext
405 0m43.327s 0m38.594s 0m4.724s
408 0m33.282s 0m29.266s 0m4.012s
409 - removing the gentext calls for nav-bar alt tags does not help
412 - try plain docbook xslt to see if maybe we have bad xslt templates in the
413 customisation layer (gtk-doc.xsl)
415 - we could do the xinlcude processing once and use it for both html and pdf
416 time /usr/bin/xsltproc 2>../xslt4.log --path /home/ensonic/projects/gnome/gtk-doc/gtk-doc/tests/gobject/docs --nonet --xinclude --stringparam gtkdoc.bookname tester --stringparam gtkdoc.version 1.14 /home/ensonic/projects/gnome/gtk-doc/gtk-doc/gtk-doc.xsl ../tester-docs.xml
418 0m4.846s 0m4.434s 0m0.147s
419 0m4.842s 0m4.386s 0m0.145s
422 time xmllint --nonet --xinclude ../tester-docs.xml >./tester-docs-all.xml
424 0m0.596s 0m0.546s 0m0.023s
426 time /usr/bin/xsltproc 2>../xslt5.log --path /home/ensonic/projects/gnome/gtk-doc/gtk-doc/tests/gobject/docs --nonet --stringparam gtkdoc.bookname tester --stringparam gtkdoc.version 1.14 /home/ensonic/projects/gnome/gtk-doc/gtk-doc/gtk-doc.xsl ./tester-docs-all.xml
428 0m4.167s 0m3.834s 0m0.106s
429 0m4.248s 0m3.851s 0m0.114s
432 time xmllint --nonet --c14n --xinclude ../tester-docs.xml >./tester-docs-all2.xml
435 0m0.700s 0m0.636s 0m0.034s
437 time /usr/bin/xsltproc 2>../xslt6.log --path /home/ensonic/projects/gnome/gtk-doc/gtk-doc/tests/gobject/docs --nonet --stringparam gtkdoc.bookname tester --stringparam gtkdoc.version 1.14 /home/ensonic/projects/gnome/gtk-doc/gtk-doc/gtk-doc.xsl ./tester-docs-all2.xml
440 0m3.344s 0m3.026s 0m0.109s
441 0m3.372s 0m3.037s 0m0.115s
444 l ../tester-docs.xml ./tester-docs-all*.xml
446 - we could also try to compact the installed xslt
447 xmllint --nonet --c14n --xinclude gtk-doc.xsl | sed -ne '/<!--/ { :c; /-->/! { N; b c; }; /-->/s/<!--.*-->//g }; /^ *$/!p;' | sed '/^$/d' >gtk-doc.pre.xsl
448 - unfortunately there is no way to ask xsltproc to pre-transform an xslt, that could
450 - process xsl:import and xsl:include
452 http://sourceforge.net/projects/xsltc/
453 http://www.xmlhack.com/read.php?item=618
454 - extra xsltproc options:
455 --novalid: saves ~ 0.12 sec
458 - not really an issue, but we can improve by compiling the regexps
459 http://stackoverflow.com/questions/550258/does-the-o-modifier-for-perl-regular-expressions-still-provide-any-benefit
460 - we use $&, $', and $` in several places (comple match, pre-match and post-match).
461 Those are slow and once they are used a single time perl prepares them for every match operation.
462 Since perl 5.10 one can use the /p flag for matches where this is needed and then use
463 ${^PREMATCH} , ${^MATCH} and ${^POSTMATCH}
465 - http://blog.timbunce.org/2008/07/15/nytprof-v2-a-major-advance-in-perl-profilers/
466 perl -d:NYTProf gtkdoc-mkdb ...
468 firefox nytprof/index.html