-
-
Notifications
You must be signed in to change notification settings - Fork 635
Unable to recreate GDExtension instance with hot reloading enabled #1673
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
Comments
Hi, I was wondering if anyone had managed to have a look at this yet? |
It sounds like |
Is |
in CMake:
In SCons the equivalent flag is |
also, if the flag is not specified, then only the template_debug and editor builds define |
Are you sure, I literally copied it from the CMakeLists.txt file from within the _deps folder for godot-cpp in my build folder. Screenshot from git tag
For now I am using MSVC and Windows, do you know of any MSVC specific flags I need to use? |
My bad, I was thinking master branch, sorry. The old 4.3 and lower cmake code is so bad it was the reason I decided to contribute. I can offer no help it's that bad, and recommend backporting all cmake/build system related changes from master instead. Fingers crossed it all gets cherry picked in the future. I maintain my own branch of 4.3 with backported changes for this reason. |
Ah, I can see where the confusion came from then. If the CMake for 4.3 is really that bad I will take a look at the main. Although 4.4 might have come out by the time I am free to work on my project again. Hopefully with 4.4 it will be easier to setup |
@LouChiSoft now that 4.4 has been release can you please test again? |
Apologies, I haven't had time to check this until now. Unfortunately it doesn't seem to work. I no longer get the same error message about trying to replace a DLL without hot reloading enabled, but the DLL isn't being reloaded. Am I right in assuming that the new CMake flag to set for hot reloading is |
I did some more digging. If I do a debug build from scratch with no artifacts then hot reloading seems to work as intended as tested by adding and removing a custom node from the extension. I can happily rebuild the extension without having to delete anything in the addon folder. As soon as I built in release with hot reloading everything seems to break. There are no error messages, but no changes in the code are reflected in the engine. And confusingly it also breaks debug builds. The only way to get it working again is to close the editor, delete the entire addon from the addon folder, rebuild the addon and re-open the editor. |
Godot version
4.3-stable (Double precision)
godot-cpp version
4.3-stable (Double precision)
System information
Windows 10, R9 7900, RX 7900XT
Issue description
Debug compile for Windows 10, using CMake included via FetchContent and enabling hot reloading via
GODOT_ENABLE_HOT_RELOAD
set toON
orYES
results in aUnable to recreate GDExtension instance - does this extension support hot reloading?
error when rebuilding the project.I've verified that the gdextension file has reloading enabled by adding a status message to the godot-cpp cmake file to print out the value of
GODOT_ENABLE_HOT_RELOAD
and make sure that it propagates from the top level which it does.Steps to reproduce
GODOT_ENABLE_HOT_RELOAD
from inside the CMakeLists to ensure that the value is set properlycmake -B ./build -DPRECISION="double"
cmake --build ./build --config Debug --parallel *desired thread count*
Unable to recreate GDExtension instance - does this extension support hot reloading?
should be in the outputMinimal reproduction project
https://github.com/LouChiSoft/GDFlecs
The text was updated successfully, but these errors were encountered: