Use new initialization for Godot 4.7.#1567
Merged
Yarwin merged 1 commit intoMay 3, 2026
Merged
Conversation
|
API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1567 |
b231fb1 to
5455692
Compare
Bromeon
reviewed
Apr 26, 2026
Member
Bromeon
left a comment
There was a problem hiding this comment.
Thanks a lot, nice change!
There is now quite a bit of #[cfg] pollution, I made a comment with a potential way to refactor this.
2e7d988 to
9bbf416
Compare
Bromeon
reviewed
Apr 30, 2026
Member
Bromeon
left a comment
There was a problem hiding this comment.
Some comments not yet addressed, otherwise looks good 👍
0f42b4a to
679c6cf
Compare
Bromeon
reviewed
May 1, 2026
cf92f84 to
54ae445
Compare
Bromeon
reviewed
May 3, 2026
49c7ee5 to
8dcc4d8
Compare
- In Godot 4.7 initialization layer receives fully initialized base to work with. - In Godot 4.7 initializing constructed object is no longer a caller responsibility.
8dcc4d8 to
3d796c3
Compare
Bromeon
approved these changes
May 3, 2026
Member
Bromeon
left a comment
There was a problem hiding this comment.
Nice, this separation looks quite clean!
Assuming that base_weak_initialization.rs contains the same logic as before this commit, this looks good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates gdext with API >= 4.7 to use
classdb_construct_object3classdb_register_extension_class6: godotengine/godot#118214.Tl;dr:
I ran tests against 4.7 && 4.7 + 4.6 API && 4.6 + 4.6 API, all seems to works fine.
I abstracted most stuff so it won't get into way or confuse people - I moved whole
init_gdworkaround into separate inner module (I think we won't work on it anymore), and added extra function which yield strong/weak pointer of freshly constructed instance from pointer to object. (The former is responsible for 2\3 changes in this PR lmao)