GDExtension documentation make_rst.py

Godot Version

4.6.1

Question

I’m working on some scripts to generate gdextension documentation from inline comments in the source code.

I have most of the class documentation completed and now want to automate generating the rst files. I was using this as a guide:

So i grabbed the two files listed in the documentation. Turned out make_rst had another dependency so I downloaded that as well (color.py). I got it running but it doesn’t generate any documentation, as it says there are errors in the class XML but the class documentation works fine in the editor.

Screenshot Editor:

Note Object, Node, Sprite2D, and Resource are fine, but notice the error messages for them.

Partial Error List:



ERROR: Summator.xml: Unrecognized opening tag “[Object]” in class “Summator” description.
ERROR: Summator.xml: Unrecognized opening tag “[Node]” in class “Summator” description.
ERROR: Summator.xml: Unrecognized opening tag “[Sprite2D]” in class “Summator” description.
ERROR: Summator.xml: Unrecognized opening tag “[Resource]” in class “Summator” description.
ERROR: Summator.xml: Unresolved type “int”.
ERROR: Summator.xml: Unresolved type “int”.
ERROR: TrafficLight.xml: Unrecognized opening tag “" in class “TrafficLight” description.
ERROR: TrafficLight.xml: Unrecognized closing tag "” in class “TrafficLight” description.
ERROR: TrafficLight.xml: Unrecognized opening tag “[Object]” in class “TrafficLight” description.
ERROR: TrafficLight.xml: Unrecognized opening tag “[Node]” in class “TrafficLight” description.
ERROR: TrafficLight.xml: Unrecognized opening tag “[Sprite2D]” in class “TrafficLight” description.
ERROR: TrafficLight.xml: Unrecognized opening tag “[Resource]” in class “TrafficLight” description.
ERROR: TrafficLight.xml: Unresolved type “Texture2D”.
ERROR: TrafficLight.xml: Unresolved type “Texture2D”.
ERROR: TrafficLight.xml: Unresolved type “Texture2D”.

Does anyone have any idea what the problem is?

does it work with xml generated from the engine with the dump options? might help you narrow down the cause. and if the engine generated xml doesnt load, then it would be a bug with the scripts and should probably be reported.

Yes it gives the same errors with the class documentation in ExampleClass.xml, so it’s not just my generated classes. And fresh docs generated with doctool don’t have the errors regarding markup (no content) but still show all the other errors about unknown references.

The problem is, not knowing what the script is supposed to do, as the only information provided is that it converts class documentation to rst, I’m unsure if the problem with the script or the documentation, or both? Again not knowing how the script is supposed to work I still can’t really rule out user error.

I guess I’ll place a comment on the page in question and file a bug report.

Update:

I downloaded the version from 4.3 instead of from master and it only throws errors for unresolved types, which makes sense because the link target doesn’t exist yet and the instructions do mention fixing links.