-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add documentation for GDScript warnings #10627
Comments
To me this makes sense to implement more or less as is. Some thoughts:
To move forward I would recommend making that initial PR that implements the single warning page you've already written, the index page for the warnings overall, and possibly a stub page for each other warning (but maybe even that should wait). Then we can discuss the exact scope and structure in the PR. |
Thanks, I'm glad you like it! I can certainly get started with the example implementation I wrote up here, and the index page to act as their parent. Would the PR with just those make sense to merge, or would it be better to keep it as a draft until we could get at least initial "what" pages ready for each warning? I'd be a little unsure about having one written-up page and then empty pages for the rest of the warnings, but if you and/or others think that's best, then I'd be fine with it. |
Either way we need to validate and review the overall structure of the page, how detailed it is, the names of the section headers, etc. So at a minimum it makes sense for the first PR to include the index and a single full example. We should review that before anything else. After that, I'm not sure if it makes the most sense to:
Personally I'd go with option 2 or 3 here, leaning towards 2, but other maintainers might have different opinions about which is better between those options. I'd recommend making the initial PR with just the index and a single page, mark it as "ready for review" once it's something that could go in the manual (the version in the OP here is fine to start with, I think), and we can go from there. |
Your Godot version: 4.4
Issue description:
Related to #368 .
There is currently no documentation for GDScript warnings in the Godot manual. I believe it may be helpful to create pages describing each warning in more detail, along with examples of code that causes them and an explanation of how to fix them.
Microsoft's official C# documentation has pages describing exceptions that can be thrown, with similar sections: https://learn.microsoft.com/en-us/dotnet/api/system.nullreferenceexception?view=net-9.0
For reference, here is my shot at writing a page for the
GET_NODE_DEFAULT_WITHOUT_ONREADY
warning:While I tried to keep everything accurate to the best of my knowledge, there might be some inaccuracies in this write-up. Of course, if this proposal were to move forward, we would want the content of the pages to be reviewed by multiple people before going live.
Hopefully, though, this example conveys the spirit of what I'm proposing.
The editor could potentially even provide a link to the corresponding page when a user encounters a particular warning, so that the user can read more about it.
The text was updated successfully, but these errors were encountered: