Skip to content

GDExtension: Check if class without recreate callback is creatable, before marking whole extension as unreloadable #99133

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

Conversation

dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Nov 12, 2024

Fixes #96823

Marking as a draft for now, because I haven't had a chance to do any testing with it yet (and this isn't something covered in our automated tests).

If anyone else has time to test before I get to it, it'd be appreciated!

UPDATE (2025-06-09): @Bromeon tested it with the Rust bindings, so no longer draft

@dsnopek dsnopek added bug topic:gdextension cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Nov 12, 2024
@dsnopek dsnopek added this to the 4.4 milestone Nov 12, 2024
@dsnopek dsnopek requested a review from a team as a code owner November 12, 2024 17:08
@dsnopek dsnopek marked this pull request as draft November 12, 2024 17:08
@dsnopek dsnopek force-pushed the gdextension-reloadable-when-not-createable branch from 683aab5 to c6c4d29 Compare November 12, 2024 17:15
@dsnopek dsnopek changed the title GDExtension: Check if class without recreate callable is creatable, before marking whole extension as unreloadable GDExtension: Check if class without recreate callback is creatable, before marking whole extension as unreloadable Nov 12, 2024
@Repiteo Repiteo added the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Feb 24, 2025
@Repiteo Repiteo modified the milestones: 4.4, 4.5 Feb 24, 2025
@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 5, 2025
Copy link
Contributor

@Bromeon Bromeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this with Rust, it works! It's now possible to have non-default-constructible classes (without a creator function) and still use hot reloading. 👍

Thanks a lot!

@dsnopek
Copy link
Contributor Author

dsnopek commented Jun 9, 2025

Awesome, thanks! Taking out of DRAFT :-)

@dsnopek dsnopek marked this pull request as ready for review June 9, 2025 12:30
@Bromeon
Copy link
Contributor

Bromeon commented Jun 9, 2025

Forgot to mention, I rebased this onto 9e02194 for the test.
Since the last commit is from November, might be worth rebasing on latest master.

…efore marking whole extension as unreloadable
@dsnopek dsnopek force-pushed the gdextension-reloadable-when-not-createable branch from c6c4d29 to e4aaf9f Compare June 9, 2025 15:40
@dsnopek
Copy link
Contributor Author

dsnopek commented Jun 9, 2025

Rebased!

@Repiteo Repiteo merged commit c10c656 into godotengine:master Jun 9, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jun 9, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release topic:gdextension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GDExtension: Classes without default constructor break reloading
4 participants