refactor code for intermediate files
gtkdoc-scan and gtkdoc-scangobj produce a bunch of intermediate files (see https://gitlab.gnome.org/GNOME/gtk-doc/blob/master/doc/gtkdoc.dot) in a homegrown format. The biggest downside is that gtkdoc-mkdb needs to parse those files again, which is a large part of the code there. Also the way it is done is to put most of the data into a large number of global lists and dictionaries, which in turn makes testing hard.
we should:
-
change gtkdoc-scan and gtkdoc-scangobj to produce json files (ideally just one file for each tool). This is relative simple since writing the files is mostly printf() (gtkdoc-scangobj is producing the data from .c code). Another option would be to produce one scan file per header. This would enable incremental scans (only scan the h-files that are newer that the scan-result file).
-
refactor gtkdoc-mkdb to simply load the json, this is more work since we need to replace all references in the code
A possible transition could be to design a new datastructure and fix the parsers in gtkdoc-mkdb to build that, then change the output for gtkdoc-scan and gtkdoc-scangobj and replace the parsers.
It would be awesome if someone would help with this.