gdext icon indicating copy to clipboard operation
gdext copied to clipboard

No docs for rust classes

Open bend-n opened this issue 2 years ago • 12 comments

https://user-images.githubusercontent.com/70787919/236376594-bf89d94a-8ed9-4c68-9e17-3ba4ff0cf95d.mp4

NEAT is a rust class extending RefCounted, and the doc page is just empty.

Godot version 8c729f0f3

bend-n avatar May 05 '23 04:05 bend-n

Is this not the exact same issue you reported under #178?

Bromeon avatar May 05 '23 09:05 Bromeon

No i dont think so, its supposed to like say (no base) function (String, int) -> int or something? Just without any descriptions.

bend-n avatar May 05 '23 09:05 bend-n

yeah, you can open documentation for custom rust classes in godot just fine. but this seems like clicking on that type in the docs for a different class/method doesn't lead you to the docs for the class? which is weird.

im guessing we're exposing the type of the arguments wrong somehow. maybe the docs rely on something like the hint_string of the argument to find the right docs to go to. I'll have a look at it.

lilizoey avatar May 05 '23 11:05 lilizoey

Actually some of the video seems to have cut, i opened the class searcher, to search for NEAT, but it wasnt there.

bend-n avatar May 05 '23 11:05 bend-n

Actually some of the video seems to have cut, i opened the class searcher, to search for NEAT, but it wasnt there.

is this with the repo you have on your github? could you provide a specific commit hash that reproduces the issue if so?

lilizoey avatar May 05 '23 11:05 lilizoey

It is, i specified the commit hash in the main description. its also prebuilt, so the artifacts are here. There shouldnt be a difference from official though as thats the normal build, which only turns off deprecated code and applys a patch or 2.

bend-n avatar May 05 '23 11:05 bend-n

i thought the hash in the main description was for godot not your repo

lilizoey avatar May 05 '23 11:05 lilizoey

It builds godot with patches and options, it doesnt fork godot. Also my patches seem to be not applying, hmm.

bend-n avatar May 05 '23 11:05 bend-n

i think this is an upstream bug. it seems godot recently made some big changes in master to how documentation is generated. (see for instance https://github.com/godotengine/godot/pull/72095, there are also other commits that impact doc-gen). and this issue does not show up on 4.1 dev 1. but it shows up in at least two different recently built godot builds.

but i havent quite been able to find out exactly why this is broken here but i dont think this is an issue with our bindings.

lilizoey avatar May 05 '23 12:05 lilizoey

Ill see if i can bisect.

bend-n avatar May 05 '23 13:05 bend-n

Bisected, im told 53191928e597d15a709b53abe1870b9f3607af1c caused it. Quite a few regressions that PR caused!

bend-n avatar May 06 '23 22:05 bend-n

Thanks a lot for investigating! 👍

Do you know if there's already an issue in the godot repo that tracks this docs problem? If not, would you want to open one, to raise awareness?

Bromeon avatar May 06 '23 22:05 Bromeon

The upstream issue https://github.com/godotengine/godot/issues/76796 was fixed recently, this can maybe be closed now?

RedMser avatar Apr 28 '24 20:04 RedMser

@RedMser have you tested that Rust classes show up in the editor? :slightly_smiling_face:

In the future we could maybe allow /// comments to be used as documentation, but could also be in a new issue.

Bromeon avatar Apr 28 '24 20:04 Bromeon

have you tested that Rust classes show up in the editor? 🙂

It does seem to work for me on 4.3 latest master yes.

In the future we could maybe allow /// comments to be used as documentation, but could also be in a new issue.

Seems to already be a separate issue here: #178

RedMser avatar Apr 28 '24 20:04 RedMser

You're right. Thank you! 👍

Bromeon avatar Apr 28 '24 21:04 Bromeon