-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Default Node GDScript Template has Warnings/Errors with new Untyped Declaration Warning #82587
Comments
Maybe it makes sense to have this enabled by default now? |
Note that the |
Confirmed that setting "Add Type Hints" to But I think there is still a usability issue that exists here... When a project has the new Untyped Declaration set to I found out about the Untyped Declaration warning when searching for a way to disable dynamic typing in GDScript, but I had no idea that I might need to make additional editor settings changes to make the script editor play nicely with my new project settings. Additionally, if a project is shared between multiple developers, all developers may not intuitively understand that they need to adjust their editor settings to play nice with the project settings. I think it would be good to brainstorm a way to make this a bit more intuitive to new users, either in this issue thread or maybe in a new proposal... |
Here are a couple of options that could address the usability issue relating to Untyped Declaration warnings/errors and Add Type Hints:
Unless option 3 is implemented, the documentation should be updated to match the default Godot behaviour. I think, at the very least, option 4 should be implemented. This way when the new Untyped Declaration project setting is officially launched, users will know how best to configure their Editor Settings when using it. |
Regarding the default template described in the documentation, I've made a separate docs issue and PR. |
Edit: Mistakenly commented on the wrong issue |
Whoops, accidentally commented on the wrong issue. |
…on warning Fixes godotengine#82587 by improving usability of the untyped_declaration warning. This adds a note to the documentation that recommends turning on EditorSettings.text_editor/completion/add_type_hints when the untyped declaration warning is set to warn or error. Co-authored-by: Yuri Sizov <[email protected]>
…on warning Fixes godotengine#82587 by improving usability of the untyped_declaration warning. This adds a note to the documentation that recommends turning on EditorSettings.text_editor/completion/add_type_hints when the untyped declaration warning is set to warn or error. Co-authored-by: Yuri Sizov <[email protected]>
Godot version
v4.2.dev5.official [e3e2528]
System information
Godot v4.2.dev5 - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 980 Ti (NVIDIA; 31.0.15.3699) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)
Issue description
When creating a new GDScript with the default Node template, untyped declarations are used:
I believe this is a bug because a template that has untyped declarations will cause warnings or errors if the new "Untyped Declaration" warning is enabled in the project settings. Additionally, the default template described in the documentation uses typed declarations and does not match the default template currently used by the editor.
Steps to reproduce
Warn
orError
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: