-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Allow coexistence of GDScript and GDExtension virtual methods in the same object #83583
Conversation
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.
Thanks!
I skimmed the code, but I think I need to some more testing with this.
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.
Everything is looking good in my testing, including with the MRP from issue godotengine/godot-cpp#1224
Great work!
So, I did some testing with a rather simple The source of the project is here: https://github.com/PgBiel/hello-gdext-wasm/tree/56916dabe21cc45eb721889a17d059d729384ccf (simply Basically, the project contains a Before this PR (4.2-beta1):
With this PR:
So I believe this PR fixes the very obvious bug of GDScript fully 'disabling' extensions' virtual method overrides even when the script does not override those particular methods at all, which is great! Based on my debugging above, however, I don't think this will fully fix issues such as godotengine/godot-cpp#1022 just yet (since e.g. you can't even call super to opt into preserving the extension's behavior as supposedly the method "isn't defined"). But this PR's fix would already be a very important step forward in this regard by fixing (issues such as) godotengine/godot-cpp#1224 . |
I've tested this PR and I'm also seeing the same results as @PgBiel. Thanks for the detailed report |
[snip]
Based on what I see in core/os/main_loop.cpp |
Unfortunately, the exact same error (bar the method name) occurs with Line 3527 in f8818f8
The error I show seems to point to the code below - I don't know the full implications yet, but this seems to suggest to me that whatever it's trying to access with godot/modules/gdscript/gdscript_analyzer.cpp Lines 3298 to 3303 in f8818f8
But this is getting a bit off-topic for the PR now; I believe we should move this discussion to a separate issue (Godot maintainers, feel free to guide us!). The following issue seems the most appropriate: #72034 The following issue also seems to be at least tangentially related, but doesn't mention native types: #82267 |
Thanks! And congrats for your first merged Godot contribution 🎉 |
…same object
Resolves godotengine/godot-cpp#1224