Skip to content

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

Closed

Description

@ytnuf

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

Activity

  1. Klaim commented on Aug 4, 2024

    @Klaim
    Contributor

    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?).

  2. added
    bug
    on Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions