Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No docs for rust classes #258

Closed
bend-n opened this issue May 5, 2023 · 16 comments
Closed

No docs for rust classes #258

bend-n opened this issue May 5, 2023 · 16 comments
Labels
bug c: register Register classes, functions and other symbols to GDScript status: upstream Depending on upstream fix (typically Godot)

Comments

@bend-n
Copy link
Contributor

bend-n commented May 5, 2023

nodoc.mp4

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

Godot version 8c729f0f3

@Bromeon
Copy link
Member

Bromeon commented May 5, 2023

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

@bend-n
Copy link
Contributor Author

bend-n commented May 5, 2023

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

@lilizoey
Copy link
Member

lilizoey commented May 5, 2023

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 lilizoey added bug c: register Register classes, functions and other symbols to GDScript labels May 5, 2023
@bend-n
Copy link
Contributor Author

bend-n commented May 5, 2023

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

@lilizoey
Copy link
Member

lilizoey commented May 5, 2023

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?

@bend-n
Copy link
Contributor Author

bend-n commented May 5, 2023

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.

@lilizoey
Copy link
Member

lilizoey commented May 5, 2023

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

@bend-n
Copy link
Contributor Author

bend-n commented May 5, 2023

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

@lilizoey
Copy link
Member

lilizoey commented May 5, 2023

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 godotengine/godot#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 lilizoey added the status: upstream Depending on upstream fix (typically Godot) label May 5, 2023
@bend-n
Copy link
Contributor Author

bend-n commented May 5, 2023

Ill see if i can bisect.

@bend-n
Copy link
Contributor Author

bend-n commented May 6, 2023

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

@Bromeon
Copy link
Member

Bromeon commented May 6, 2023

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?

@RedMser
Copy link

RedMser commented Apr 28, 2024

The upstream issue godotengine/godot#76796 was fixed recently, this can maybe be closed now?

@Bromeon
Copy link
Member

Bromeon commented Apr 28, 2024

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

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

@RedMser
Copy link

RedMser commented Apr 28, 2024

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

@Bromeon
Copy link
Member

Bromeon commented Apr 28, 2024

You're right. Thank you! 👍

@Bromeon Bromeon closed this as completed Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c: register Register classes, functions and other symbols to GDScript status: upstream Depending on upstream fix (typically Godot)
Projects
None yet
Development

No branches or pull requests

4 participants