Add a long annotated parameter description (regression test for #613611)
[gtk-doc.git] / TODO
blob6cf0059daa38998b1d79db724e6b7cdf8839e0ec
2 The TODO list for the gtk-doc project is at Bugzilla,
3 the bugtracking system of the GNOME project.
5 Visit
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
12 Also have a look at
13  http://live.gnome.org/DocumentationProject/GtkDocFuture
14 and join discussion about future features.
17 Developers can also add items here :)
19 = Cleanups =
20 == Tracing ==
21 * there is a bunch of #print statements for tracing
22   => add a sub Trace() to gtkdoc-common.pl
23   => use @TRACE@ "..." and depending on configure flag
24      turn that into
25        [print __FILE__ . ":" . __LINE__ . ":" . ] or [#]
26      should be a function and the function should support loglevels and an
27        envar to enable/disable conditionally;
28        
29 = More abbreviations =
30 * expand urls (needds more work, see gtkdoc-mkdb : ExpandAbbreviations)
32 = Testing =
33 cd test/gobject
34 diff -u --exclude="Makefile*" docs docs-tmpl | diffstat
36 = Issues =
37 * gtkdoc-fixxref makefile targets use $HTML_DIR
38   * HTML_DIR: The directory where gtk-doc generated documentation is installed
39     it comes from gtk-doc.m4 (--with-html-dir) but has no default
40   * automake exports $htmldir which is by default:
41     ${prefix}/share/doc/${PACKAGE_TARNAME}
42   * the Makefile uses $(DESTDIR)$(TARGET_DIR)
43     where TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
44     http://www.gnu.org/software/libtool/manual/automake/DESTDIR.html
45     
46 * $MODULE-unused.txt is produced in gtkdoc-mktmpl only
47   * we won't find unused doc blobs in notmpl build
48   * we should add mktmpl::CheckAllDeclarationsOutput() to mkdb (call it after
49     OutputSGML), but only call it if there is no tmpl dir or
50     remove writing the unused.txt in mktmpl.txt
52 = Output =
53 * http://sagehill.net/docbookxsl/index.html
54 * multipage-html
55   * would be good to be able to have page titles as a concatenation of document
56     name and page name (gtk+:GtkWIdget)
57 * formats
58   http://bugzilla.gnome.org/show_bug.cgi?id=531572 : html-single
59   http://bugzilla.gnome.org/show_bug.cgi?id=466535 : pdf
60   http://bugzilla.gnome.org/show_bug.cgi?id=467488 : man
61   we need more configure options in gtk-doc.m4:
62   --(enable|disable)-gtk-doc-(html|pdf|man|html-single|rtf)
63   - html : enabled by default
64   - html-single : is single page html
65 * validation
66     xmllint --noout --xinclude --postvalid tester-docs.xml
67     xmllint --noout --postvalid tester-docs.fo --dtdvalid file://$HOME/download/fo.dtd
68     - fo.dtd : http://www.renderx.com/Tests/validator/fo.zip
69 * single page
70   xsltproc  --nonet --xinclude -o gtk-docs.html /home/ensonic/projects/gtk-doc/gtk-doc-single.xsl  gtk-docs.sgml
71   * need to check if we can pass the style-sheet class as a parameter (--stringparam gtkdoc.stylesheet=(chunk|docbook))
72   * we might also need to reflow some things, as gtk-doc.xsl also runs the devhelp/devhelp2 generation
73     - but then the urls in the devhelp file, refer to the chunked html anyway
74 * pdf
75   * xmlto via passivetex
76     xmlto --skip-validation pdf tester-docs.xml
77   * fop
78     ~/download/fop-0.95beta/fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl -xml tester-docs.xml -pdf tester-docs.pdf 
79     ~/download/fop-0.94/fop  -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl -xml tester-docs.xml -pdf tester-docs.pdf
80   * xsltproc + fop
81     xsltproc  --nonet --xinclude -o tester-docs.fo ../../../gtk-doc-fo.xsl tester-docs.xml
82     ~/download/fop-0.94/fop -fo tester-docs.fo -pdf tester-docs.pdf
83   * xsltproc + passivetex
84     pdflatex "&pdfxmltex" tester-docs.fo
85     xmltex tester-docs.fo
86   * jade
87     docbook2pdf -e no-valid tester-docs.sgml
89   * bugs/problems/howto
90     * xmlto via passivetex
91       http://bugs.gentoo.org/show_bug.cgi?id=224937
92       http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=310148
93       - info
94         http://www.tug.org/texlive/devsrc/Master/texmf-dist/doc/xmltex/passivetex/
95     * fop
96       https://issues.apache.org/bugzilla/show_bug.cgi?id=46386
97       - download fop (don't use 0.95, 0.94 seems to work)
98         http://mirror.eunet.fi/apache/xmlgraphics/fop/binaries/
99         http://xmlgraphics.apache.org/fop/0.94/running.html
100         export FOP_OPTS="-Dhttp.proxyHost=xxx -Dhttp.proxyPort=8080"
101       - download offo
102         http://sourceforge.net/project/showfiles.php?group_id=116740&package_id=129569&release_id=267101
103         and copy fop-hyph.jar to fop-0.9*/lib/
104 * rtf
105  ~/download/fop-0.94/fop -fo tester-docs.fo -rtf tester-docs.rtf
106  * unrtf
107    unrtf -t ps tester-docs.rtf >tester-docs.ps
108    unrtf -t latex tester-docs.rtf >tester-docs.tex
109    - bad output
110 * man
111   we shouldn't convert the whole document to man. We should convert e.g. tool
112   sections to man pages.
114 = Indexes =
115 * http://www.w3.org/TR/2003/WD-xinclude-20031110/#syntax
116 <xi:include href="index-symbols.html">
117   <xi:fallback><index /></xi:fallback>
118 </xi:include>
119 * index terms
120   http://sourceforge.net/tracker/index.php?func=detail&aid=1986587&group_id=21935&atid=373747
122 * we could add smart navigation for index/glossary pages
123   (like the subsections on the doc-pages)
124   
125 = Cleanup =
126 * can we deprecate title in the sectionfile and request people to have this in
127   the SECTION comment?
129 = Warnings =
130 * add some -Wxxx parameters to help qa work
131   - 'deprecated' deprecating 'features'
132   - 'dummy-docs' check if symbol docs are very short and repeat mainly words
133     from the symbol.
135 = Markup =
136 * protected scope
137   * we can have /* < protected > */ in classes
138   * we can have <SUBSECTION Protected> in -section.txt
139   * ideally we have Scope: {Public, Protected, Private} supported in doc comments
140   * there is a bg for gir, https://bugzilla.gnome.org/show_bug.cgi?id=594125
142 = GIR =
143 == scanning ==
144 * ideas
145   * use gir files
146     1) replace gtkdoc-scan/gtkdoc-scangobject by gtkdoc-gir and output the classical files or
147        patch gtkdoc-scan/gtkdoc-scangobject to output gir files
148     2) patch gtkdoc-mkdb to read stuff from gir instead of classical files
149   * if gir-files would have the comments too (they are getting this now):
150     * we could even drop scanning the sources
151     * IDEs could use the gir-files to show doc-tooltips for symbols
152 * perl and xml
153   * http://www.xml.com/pub/a/2001/04/18/perlxmlqstart1.html
154 == binding docs ==
155 * simmillar workflow to gettext
156 * add gtkdoc-mk??? to generate binding doc templates
157   * have c-comments there as comments
158   * when updating templates, mark sections that have changed as fuzzy
159 * add options to gtkdoc-mkdb to build docbook from those templates
160 * questions
161   * could we use the tmpl file mechanism?
162   * directory structure?
163     * we need to list the languages like ALL_LINGUAS for translations
164     * we need to create subdirs for binding docs, ideally we use one for 'C' as well
165 * devhelp
166   * devhelp files need a language attribute in the book-tag
167     language={C,C++,JavaScript,Perl,Python,...}
168   * devhelp could show a selector for the language
169   * need to get existing python/~mm docs to use it, gtk-doc could output
170     language=C for own docs 
171 == installation ==
172 * need to install each book with a prefix
173 * would be good to have a language attribute in book tag to allow filter by language
174 * look at /usr/share/gtk-doc/html/pygobject/index.html
176 = linking to sources =
177 - what about a template URL containing a %s for the "path/file". 
178   http://svn.gnome.org/viewvc/gtk-doc/trunk/tests/gobject/src/gobject.c?view=markup
179   http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/src/lib/core/core.c?view=markup
180   - unfortunately we can't link to symbols
181   - linking to files is difficult as in gtkdoc we have modules
184 = docbook xml =
185 Its tedious to write large amounts of docbook.
187 == more macros ==
188 We need parametric, user definable macros.
189 |[ ... ]| - programlistings
190 |macro(arg1,arg2,...)[ ... ]| - call macro
191   - pass args as parameters (on the commandline)
192   - pass some gtk-doc vars in environment
193     (gtk-doc version, module, srcdir, buildir)
194   - content of [] on stdin or as a file
195   - get output on stdout or file
196   - and replace the macro with it
197 The changes could be made in gtkdoc-mkdb::ExpandAbbreviations()
198 === example macros ===
199 |highlight(c)[...]| - highlight source code for a specific language
200 |dot(abc.svg)[...]| - format dot graph and include result as mediaobject
201 |ditta(abc.svg)[...]| - parse ascii art and include result as mediaobject
203 === where to define macros ===
204 * system wide and with the package, <prefix>/share/gtk-doc/macros, $(srcdir)
205 * prefix for custom macros?
206 * we could require stdin for input and stdout for output, the wrapper for the
207   actual tool can ensure the convention
209 == ascii doc as a frontend ==
210 Can we offer integration with asciidoc (http://www.methods.co.nz/asciidoc/)?
211 This way the master document could be written much easier. It would be cool if
212 we could use the asciidoc markup in source-comments also.
214 == extract other bits and pieces ==
215 === library api ==
216 gtkdoc-scan could be obsoleted and gtkdoc-mkdb would build docbook fragemnts for
217 api docs and their indexes
218 === DBUs Interfaces ===
219 http://hal.freedesktop.org/docs/DeviceKit/DeviceKit.html
220 http://cgit.freedesktop.org/DeviceKit/DeviceKit/tree/doc/dbus
221 === GConf schemas ===
223 === Wiki imports ===
227 = styling =
228 == source code examples==
229 http://bugzilla.gnome.org/show_bug.cgi?id=536928
230 We could also run a postprocessing script in gtkdoc-mkhtml/gtkdoc-fixxref
232 tools:
233   source-highlight (/usr/bin/source-highlight)
234   source-highlight -itests/gobject/examples/gobject.c -o$HOME/temp/gobject.html -n -t4 -sc
235   source-highlight -itests/gobject/examples/gobject.c -o$HOME/temp/gobject.html -n -t4 -sc -cstyle.css --no-doc
236   source-highlight -itests/gobject/examples/gobject.c -o$HOME/temp/gobject.xml -n -t4 -sc -f docbook
238   highlight -itests/gobject/examples/gobject.c -o$HOME/temp/gobject.xml -l -X -f -j2
240 some tips about styling code listings in html
241 http://www.tjkdesign.com/articles/how_to_style_a_code_listing.asp
243 === process docbook ===
244 if we highlight to docbook, we just get emphasis (bold)
245 === process html ===
246 if we hightlight to html we get colors, we need to check what tags we should process though:
247 <pre class="programlisting"> is used for all code boxes.
248 <div class="informalexample"><pre class="programlisting"> is used for examples.
249 problems:
250 * in html we don't know the language anymore
251   * add another div
252 * with source-highlight, constants and types are not markedup.
253   for types we might need to build an own lang file dynamically and include
254   /usr/share/source-highlight/c.lang
255 === |[ ... ]| does not allow setting the language ===
256 * check for vi/emacs/jedit modelines
257   jedit: http://www.jedit.org/users-guide/buffer-local.html
258   vim: http://vim.wikia.com/wiki/Modeline_magic
259   emacs: http://www.delorie.com/gnu/docs/emacs/emacs_486.html
260 * allow <!-- language="C" --> comments after |[
261 * we need to catch those when processing the docbook and expanding the |[
265 = syntax =
266 == wildcards in symbol names ==
267 Somtimes one defines a set of function and macros with very simillar purpose, e.g.
268 READ_INT8, READ_INT16, READ_INT32. It would be great to allow documenting a symbol
269 READ_INT* instead of 3 docs which are copy'n'pasted anyway. In the output we will have
270 all matching declarations in one source listing. Multiple wildcards are okay.
273 = documentation best practises #518427 =
274 * we'd like offer a more complete skelleton
275   * structure
276   * docbook markup (part/chapter structure)
277 * structure
278   Sugested structure for api-docs.
279   Idea is to have more content that api reference. It would be good to have a
280   gnome-platform document in devhelp, so that we could xref that instead of
281   explaining 100 times how to use pkg-config.
283   * examples
284     * gobject in devhelp
285       * concepts / api / tools / tutorial / related tools
286     * gtk in devhelp
287       * overview / api / migation / tools
288     * qt reference docs in qt assistant
289       * classes / overview / tutorial&examples
290   * recommendation
291     * front-page
292       * table with details (http://www.docbook.org/tdg/en/html/bookinfo.html)
293         (problem: what enclosing tag)
294         Logo, Module Version
295         Copyright and Legalnotice
296         Links
297         * homepage, mailing lists, irc channel
298         * repository, source releases, bugtracker
299       * TOC
300     * introduction - what is is about
301     * concepts - explain basic ideas and terminology
302     * development - how to build and run, env-vars, different platforms
303     * api - classic api docs
304     * tutorial & examples - integrated to keep it up-to-date and cross referenced
305     * migration - how to for api changes, deprecations
306     * (releated) tools - tools part of the package or recommended for development
307     * indexes - api-index, depretations, new api since xxx
309 proposed structure in docbook xml:
310 <book>
311   <bookinfo>
312   </bookinfo>
313   <preface><title>Introduction</title>
314     ...
315   </preface>
316   <part label="I"><title>xxx Overview</title>
317     <xi:include href="building.xml" />
318     ...
319   </part>
320   <reference label="II"><title>xxx Core Reference</title>
321     <xi:include href="xml/gtkmain.xml" />
322     ...
323   </part>
324   <reference label="III"><title>xxx Object Reference</title>
325     <chapter><title>Object Hierarchy</title>
326       <xi:include href="xml/tree_index.sgml" />
327     </chapter>
328     <chapter>...
329   </part>
330   <index>...</index>
331 </book>
333 some things to check:
334 * gtk,glib: can we make a <part> for the glosary and index's (according to docbook, yes)
335   should we use <appendix>? its like a chapter.
336 * gobject: uses a <preface> for introductions
337 * 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 == codesearch ==
348 - google (code) link : http://www.google.com/codesearch?q=g_object_unref
349 == live editing ==
350 The idea is to have an 'edit' link in an online version of the docs (build from
351 head development version) per doc-entry (symbols and section).
352 The link goes to a cgi and that gets following parameters: docmodule,symbol.
353 E.g. http://library.gnome.org/devel/references/edit?docmodule=glib&symbol=g_new
354 The cgi would need a hashmap to get from docmodule to the way to check it out
355 (ideally it has a recent checkout and only updates it).
356 problems:
357 - signal that this has been edited already?
358 - support for xi:included examples
359 - updating the checkout could be slow
361 = fix missing since docs =
362 cd gstreamer/gstreamer/docs/gst
363 gtkdoc-mkdb --module=gstreamer --source-dir=../../gst --outputsymbolswithoutsince
364 cd gstreamer/gstreamer/src
365 git bisect start
366 git bisect good
367 git bisect bad RELEASE-0_10_0
368 git bisect run script.sh
370 script:
371 #!/bin/sh
372 make ctags
373 grep "gst_caps_is_always_compatible" tags
376 = performance =
377 - timestamp each step
378   make check >make.log
379 - try CFLAGS=-O0 for compiling the scanner, no need to optimize it
380   CFLAGS="-O0" make check >make.log
381   safes max 0.5 sec.
382 - xslt
383   http://docbook2x.sourceforge.net/latest/doc/performance.html
384   - play with xsltproc --profile --verbose --timing
385     cd tests/gobject/docs/html
386     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
387     - l10n.language is slow
388       bug: https://sourceforge.net/tracker/index.php?func=detail&aid=2918673&group_id=21935&atid=373750
389       see: http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg05412.html
390       - overide l10n.language
391         glib/gobject
392         real        user        sys
393         2m15.221s   1m58.740s   0m1.456s
394         >
395         1m55.480s   1m44.296s   0m2.125s
396       - override many template related to gentext
397         real        user        sys
398         0m43.327s   0m38.594s   0m4.724s
399         >
400         real        user        sys
401         0m33.282s   0m29.266s   0m4.012s
402       - removing the gentext calls for nav-bar alt tags does not help
404       
405   - try plain docbook xslt to see if maybe we have bad xslt templates in the 
406     customisation layer (gtk-doc.xsl)
408   - we could do the xinlcude processing once and use it for both html and pdf
409     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
410     real        user       sys
411     0m4.846s    0m4.434s   0m0.147s
412     0m4.842s    0m4.386s   0m0.145s
413     
414     
415     time xmllint --nonet --xinclude ../tester-docs.xml >./tester-docs-all.xml
416     real        user       sys
417     0m0.596s    0m0.546s   0m0.023s
418     
419     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
420     real        user       sys
421     0m4.167s    0m3.834s   0m0.106s
422     0m4.248s    0m3.851s   0m0.114s
423     
424     
425     time xmllint --nonet --c14n --xinclude ../tester-docs.xml >./tester-docs-all2.xml
426     
427     real        user       sys
428     0m0.700s    0m0.636s   0m0.034s
429     
430     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
431     
432     real        user       sys
433     0m3.344s    0m3.026s   0m0.109s
434     0m3.372s    0m3.037s   0m0.115s
435     
436     
437     l ../tester-docs.xml ./tester-docs-all*.xml
438     
439   - we could also try to compact the installed xslt
440     xmllint --nonet --c14n --xinclude gtk-doc.xsl | sed -ne '/<!--/ { :c; /-->/! { N; b c; }; /-->/s/<!--.*-->//g }; /^  *$/!p;' | sed '/^$/d' >gtk-doc.pre.xsl
441     - unfortunately there is no way to ask xsltproc to pre-transform an xslt, that could
442       - strip comments
443       - process xsl:import and xsl:include
444   - compile xslt
445     http://sourceforge.net/projects/xsltc/
446     http://www.xmlhack.com/read.php?item=618
448 - perl regexps
449   not really an issue, but we can improve by compiling the regexps
450   http://stackoverflow.com/questions/550258/does-the-o-modifier-for-perl-regular-expressions-still-provide-any-benefit