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

Hot Reloading doesn't work when built with CMake #1542

Closed
ytnuf opened this issue Aug 4, 2024 · 1 comment · Fixed by #1330
Closed

Hot Reloading doesn't work when built with CMake #1542

ytnuf opened this issue Aug 4, 2024 · 1 comment · Fixed by #1330
Labels
bug This has been identified as a bug

Comments

@ytnuf
Copy link
Contributor

ytnuf commented Aug 4, 2024

Godot version

4.2

godot-cpp version

4.2

System information

Fedora Linux 40

Issue description

If you build godot-cpp with CMake and use it for a GDExtension project, said project will not support hot reloading.
Even if you specify the reloadable=true in the gdextension file.

Steps to reproduce

  • Obtain a GDExtension project that uses CMake (a simple to reproduce example is provided below)
  • Build the library
  • Open a godot project that uses the library (also included below)
  • Edit one file, and rebuild the library
  • Go back to godot, and an error will appear ("Unable to recreate GDExtension instance - does this extension support hot reloading?")

Minimal reproduction project

https://github.com/ytnuf/gdextension_example

@Klaim
Copy link
Contributor

Klaim commented Aug 4, 2024

Indeed, one needs to add -DHOT_RELOAD_ENABLED to the CMake configuration to enable it (this is an immediate workaround you can use if you need to now) but no explicit options are currently setup for CMake, nor is it documented (or I just didnt find it?).

@Calinou Calinou added the bug This has been identified as a bug label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants