-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Fix GDScript analyzer error when instantiating EditorPlugins. #93942
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
@MikeSchulze Since the original author doesn't respond for several days, feel free to continue their work (the original PR has some unresolved suggestions). |
@dalexeev done, can you assign the pr to me please? |
Ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me and it fixes the bug.
There are some inconsistencies between is_abstract()
and is_virtual()
. I think in the future we should remove #ifdef TOOLS_ENABLED
code and the !ti->disabled
check from is_virtual()
, but for now let's leave it as is.
@MikeSchulze Please squash commits into one according to our PR workflow. Make sure you are the commit author and @baptr is a co-author (or vice versa).
Editor code is not instantiable outside of the editor (https://github.com/godotengine/godot/blob/1d14c054a12dacdc193b589e4afb0ef319ee2aae/core/object/class_db.cpp#L369). This is fine for editor plugins and the like, but the GDScript analyzer balks at it, causing F5 runs to fail: godotengine#73525. Instead, we really just want to know if the type is abstract - so add a new ClassDB method to check that and nothing else. Update core/object/class_db.cpp Apply code review comments Co-Authored-By: Bryce <1522777+baptr@users.noreply.github.com>
@dalexeev done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that you are still not the commit author:
Also please do not use GitHub links in commit messages in the future, see CONTRIBUTING.md:
If your commit fixes a reported issue, please include it in the description of the PR (not in the title, or the commit message) using one of the GitHub closing keywords such as "Fixes #1234". This will cause the issue to be closed automatically if the PR is merged. Adding it to the commit message is easier, but adds a lot of unnecessary updates in the issue distracting from the thread.
Thanks! |
Continue from originally #74025