Ticket #1 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

Docs fail to compile succesfully (Doxygen/DDoc)

Reported by: Pse Assigned to: Pse
Priority: major Milestone: Pre-release 8
Component: Documentation Version: TRUNK
Keywords: docs doxygen ddoc documentation Cc:

Description

gtkD's current documentation scripts are not working as they should, probably because there's a mix of doxygen, ddoc and other styles of documentation comments in the source code. It'd be wise to settle for a single (officially supported) style. Currently I'm unable to get doxygen to run past 'computing class inheritance relations' (seems to sit there indefinitely). DDoc, on the other hand, successfully builds a couple of pages, but some are blank (probably due to parameter lists being in the wrong syntax). I think doxygen is the right choice for the task, if only I could get it to produce some output. It'd be fairly simple, then, to write a short script that could make the necessary changes to files in the wrong syntax.

Attachments

ddoc_format.sh (1.6 kB) - added by Pse on 12/26/07 03:58:47.
DDoc formatter. Parses all comments and converts them to DDoc style formatting.
ddoc.diff (4.5 kB) - added by Mike Wey on 12/26/07 11:08:47.
wraper DDoc patch.
ddoc-cairo.diff (5.9 kB) - added by Mike Wey on 12/27/07 10:24:01.
DDoc in APILookupcairo.txt, includes the cairoLib.Cairo -> cairo.Cotext change
ddoc-gtk.diff (55.1 kB) - added by Mike Wey on 12/27/07 19:19:48.
DDoc in APILookupGtk.txt + added empty comments to functions that had none
ddoc-glade.diff (3.5 kB) - added by Mike Wey on 12/27/07 19:20:46.
DDoc in APILookupGlade.txt
ddoc-atk-gda-gdk-pixbuf-gld-glib.diff (12.2 kB) - added by Mike Wey on 12/28/07 11:25:19.
DDoc in APILookup[Atk | Gda | Gdk | GdkPixbuf? | Gld | Gilb].txt
ddoc-theRest.diff (16.7 kB) - added by Mike Wey on 12/28/07 16:39:17.
The rest of the APILookup*.txt files

Change History

12/19/07 01:11:29 changed by JJR

  • version set to 1.0.
  • component changed from DSSS Support to Documentation.
  • milestone set to Release 1.0.

12/19/07 13:00:06 changed by Pse

  • owner changed from somebody to Pse.

12/19/07 13:00:20 changed by Pse

  • status changed from new to assigned.

12/24/07 04:24:01 changed by TiMBuS

I have found doxygen 'works' if you build docs for each subfolder separately. However this makes the output a little more messy, and there are a lot of blank linked packages..

12/24/07 10:59:57 changed by Pse

  • summary changed from [DOCS] Docs fail to compile succesfully (Doxygen/DDoc) to Docs fail to compile succesfully (Doxygen/DDoc).

Interesting. I guess something's wrong with the way doxygen handles imports, probably a circular inclusion. I intend to have something working by the weekend, thanks for your report.

12/26/07 03:58:47 changed by Pse

  • attachment ddoc_format.sh added.

DDoc formatter. Parses all comments and converts them to DDoc style formatting.

12/26/07 04:04:05 changed by Pse

*Sigh* It seems the above script is not enough. Something is preventing DDoc's parser from going through certain source files. A simple side by side visual comparison does not reveal any potentially relevant differences. I guess we'll have to keep looking...

(follow-up: ↓ 9 ) 12/26/07 04:14:39 changed by Pse

src/gtk/Selections.d gets fully documented by DDoc. src/gtk/Notebook.d gets a blank page. Why?

12/26/07 04:50:07 changed by TiMBuS

I would personally prefer it if Doxygen was used instead of DDoc. It outputs cleaner looking documents, and it seems to be much easier to browse through.

However with that said, I can't see why DDoc won't work..

(in reply to: ↑ 7 ) 12/26/07 11:03:32 changed by Mike Wey

Replying to Pse:

src/gtk/Selections.d gets fully documented by DDoc. src/gtk/Notebook.d gets a blank page. Why?

The Biggest problem with the DDoc in GtkD seems to be that the DDoc comments for the classes are above the 'import gtk.parent;' instead of above the actual class.

Example:

/**
 * Comments
 */
import gtk.ParentClass;
public class Class : ParentClass

Has no DDoc generated while the following does have DDoc generated.

import gtk.ParentClass;
/**
 * Comments
 */
public class Class : ParentClass

12/26/07 11:08:32 changed by Mike Wey

I've changed the warper to get proper DDoc comments, So far the DDoc seems to get generated correctly with these changes.

12/26/07 11:08:47 changed by Mike Wey

  • attachment ddoc.diff added.

wraper DDoc patch.

12/26/07 12:24:34 changed by Pse

Great job, Mike. I'll test this as soon as possible and get it committed if possible.
I'll see about creating a proper 'AUTHORS' file to get all contributions properly listed.

TiMBuS, I intend to get Doxygen working somewhere along the road. However, for the moment, getting at least one type of documentation shipping with gtkD seems like a much safer bet.

(follow-up: ↓ 13 ) 12/26/07 15:08:43 changed by Pse

There seems to be a problem wrapping certain files with your patch, Mike. For instance, in glade/Glade.d only some comments get converted to DDoc format.

(in reply to: ↑ 12 ) 12/27/07 09:39:43 changed by Mike Wey

This seems to come from the code in the APILookup*.txt files, witch has all kinds of different documentation, (DDoc, Doxygen, copy/paste of Documentation).

I'll attach the diff's of a few updated APILookup*.txt files.

12/27/07 10:24:01 changed by Mike Wey

  • attachment ddoc-cairo.diff added.

DDoc in APILookupcairo.txt, includes the cairoLib.Cairo -> cairo.Cotext change

12/27/07 19:19:48 changed by Mike Wey

  • attachment ddoc-gtk.diff added.

DDoc in APILookupGtk.txt + added empty comments to functions that had none

12/27/07 19:20:46 changed by Mike Wey

  • attachment ddoc-glade.diff added.

DDoc in APILookupGlade.txt

12/28/07 11:25:19 changed by Mike Wey

  • attachment ddoc-atk-gda-gdk-pixbuf-gld-glib.diff added.

DDoc in APILookup[Atk | Gda | Gdk | GdkPixbuf? | Gld | Gilb].txt

12/28/07 14:24:44 changed by Pse

Mike, would you mind revising your ddoc-cairo.diff patch? It seems it has introduced a bug:

cairo/Context.d:158: constructor cairo.Context.Context.this (cairo_t *) does not match parameter types (cairo_t *)
cairo/Context.d:158: Error: cyclic constructor call
cairo/Context.d:158: Error: cannot implicitly convert expression ((*gdk_cairo_create)((drawable.getDrawableStruct)())) of type cairo_t * to gdk.Drawable.Drawable
cairo/Context.d:170: Error: cannot implicitly convert expression ((this.getContextStruct)()) of type cairo_t * to cairo_t *
cairo/Context.d:186: Error: cannot implicitly convert expression ((this.getContextStruct)()) of type cairo_t * to cairo_t *
cairo/Context.d:202: Error: cannot implicitly convert expression ((this.getContextStruct)()) of type cairo_t * to cairo_t *
cairo/Context.d:214: Error: cannot implicitly convert expression ((this.getContextStruct)()) of type cairo_t * to cairo_t *
cairo/Context.d:226: Error: cannot implicitly convert expression ((this.getContextStruct)()) of type cairo_t * to cairo_t *

The diffs are in r331 already. Once we can sort this out, I'll rewrap gtkD to reflect these changes.

(follow-up: ↓ 16 ) 12/28/07 15:18:48 changed by Pse

Amusing: I've switched to DMD and I'm getting completely different errors while compiling. Looking at the gdc output above, it should be obvious something is really wrong with it. Just how broken can a compiler be? This is DMD's output:

gtkc/gdk.d(31): module cairoLibtypes cannot read file 'gtkc/cairoLibtypes.d'

Now that looks reasonable.

On the upside of things, DDoc seems to be working.

(in reply to: ↑ 15 ; follow-up: ↓ 17 ) 12/28/07 15:30:41 changed by Pse

Replying to Pse:

Amusing: I've switched to DMD and I'm getting completely different errors while compiling. Looking at the gdc output above, it should be obvious something is really wrong with it. Just how broken can a compiler be? This is DMD's output: {{{ gtkc/gdk.d(31): module cairoLibtypes cannot read file 'gtkc/cairoLibtypes.d' }}} Now that looks reasonable. On the upside of things, DDoc seems to be working.

Fixed in r332. Ignore comment 14, it seems gtkD has actually managed to hit 4 potentially unrelated gdc bugs. Nice.

Preparing for full rewrap.

12/28/07 16:39:17 changed by Mike Wey

  • attachment ddoc-theRest.diff added.

The rest of the APILookup*.txt files

(in reply to: ↑ 16 ) 12/28/07 16:45:45 changed by Mike Wey

Replying to Pse:

Fixed in r332. Ignore comment 14, it seems gtkD has actually managed to hit 4 potentially unrelated gdc bugs. Nice.

That gdc is unable to convert cairo_* to cairo_* looks like a very strange error. :P

I see in r332 that i missed one import.

12/28/07 18:01:24 changed by Pse

Rewrapped gtkD in r336. Just call:

./makedocs.sh

And you'll get candydoc style docs in the docs folder. Thanks a lot, Mike.

BTW, I've not added your ddoc-theRest.diff patch yet. I'll commit it and leave it ready for the next rewrap.

12/28/07 18:30:35 changed by Pse

ddoc-theRest.diff in r337.

12/29/07 01:30:38 changed by Pse

  • version changed from 1.0 to TRUNK.

01/01/08 09:08:02 changed by Pse

  • status changed from assigned to closed.
  • resolution set to fixed.

DDoc should suffice for now. I'll open a separate ticket for Doxygen support and set it to release 1.0.

01/01/08 09:16:00 changed by Pse

  • milestone changed from Release 1.0 to Pre-release 8.