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

Fix GDScript analyzer error when instantiating EditorPlugins. #93942

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

MikeSchulze
Copy link

@MikeSchulze MikeSchulze commented Jul 4, 2024

@MikeSchulze MikeSchulze requested review from a team as code owners July 4, 2024 15:56
@AThousandShips

This comment was marked as resolved.

@dalexeev
Copy link
Member

dalexeev commented Jul 8, 2024

@MikeSchulze Since the original author doesn't respond for several days, feel free to continue their work (the original PR has some unresolved suggestions).

@MikeSchulze
Copy link
Author

MikeSchulze commented Jul 9, 2024

@dalexeev done, can you assign the pr to me please?

@MikeSchulze
Copy link
Author

Ready for review

Copy link
Member

@dalexeev dalexeev left a 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).

core/object/class_db.cpp Outdated Show resolved Hide resolved
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>
@MikeSchulze
Copy link
Author

@dalexeev done

Copy link
Member

@dalexeev dalexeev left a 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.

@akien-mga akien-mga changed the title Fix gdscript analyzer error when instantiating EditorPlugins. Fix GDScript analyzer error when instantiating EditorPlugins. Jul 10, 2024
@akien-mga akien-mga merged commit fe5d567 into godotengine:master Jul 11, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

EditorExportPlugin raises error everytime you run the game with F5 because of "abstract native class"
5 participants