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

docs.rs source code not accessible for gdnative::api symbols #943

Open
Bromeon opened this issue Sep 13, 2022 · 1 comment
Open

docs.rs source code not accessible for gdnative::api symbols #943

Bromeon opened this issue Sep 13, 2022 · 1 comment

Comments

@Bromeon
Copy link
Member

Bromeon commented Sep 13, 2022

For symbols inside gdnative::api module, navigating to the source code leads to an error.

In gdnative 0.10.1:
KinematicBody::move_and_slide, then click [source]

This was already present in 0.9.0:
KinematicBody::move_and_slide, then click [src]

Result:
grafik

It's likely happening because this file is generated (filename generated.rs) and part of the target folder. It's also not checked into version control. Maybe moving it to a gen/ folder inside src could help.

@chitoyuu
Copy link
Contributor

chitoyuu commented Dec 6, 2022

Question: is the generated source code ever going to be actually useful for end users? I'm aware that some were led to believe that the methods don't exist because they can't follow the source link, but perhaps it's better to approach this from a documentation perspective, than to try and fight with rustdoc and complicate the build process?

We can, for example, emit a short notice like:

Note: Generated source code for API methods might not be availble in rustdoc. This is normal.

... for each of the methods. I recall there being some way to detect whether the program is being compiled for docs.rs, which can optionally be used to reduce clutter when the docs are being built locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants