Godot version
v4.5.1.stable.official [f62fdbde1]
godot-cpp version
4.4 [269c925]
System information
Godot v4.5.1.stable - Pop!_OS 22.04 LTS on X11 - X11 display driver, Single-window, 3 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Ti - AMD Ryzen 9 7950X 16-Core Processor (32 threads) - 61.94 GiB memory
Issue description
In #1747, we added the "use_static_cpp" flag for Linux, and made it enabled by default
However, in my testing, this appears to break reload. :-/ Specifically, it prevents Godot from loading the new versions of any virtual methods. Other aspects of hot reload may still work, but I'm not sure
For reusable GDExtensions (ie not ones with game logic), enabling "use_static_cpp" makes sense as a default. However, for ones that include game logic, reload is very important!
We have a couple options:
- Make
use_static_cpp default to disabled
- Make
use_hot_reload default to disabled
- Automatically disable
use_static_cpp if use_hot_reload is enabled
- Automatically disable
use_hot_reload if use_static_cpp is enabled
- Figure out some change to godot-cpp that allows
use_static_cpp to still work with use_hot_reload?
Unfortunately, I have no idea how to do nr 5
I kind of wish we could do nr 2, but that's been the default for so long, it would be pretty disruptive. (This also applies to nr 4, which would effectly lead to nr 2, since that would be what happens with no options.)
So, only nr 1 and nr 3 are really viable, given that use_static_cpp has only been around for a short time
Steps to reproduce
- Make a GDExtension with a
Node that prints something in _process()
- In the editor, make a scene that has this node
- Notice that the log is filling up with your print statements!
- Rebuild the GDExtension, and focus on the editor
- Notice that your prints have stopped appearing in the log
Minimal reproduction project
Haven't had a chance to make one (but would probably be useful if other folks want to look into it)
Godot version
v4.5.1.stable.official [f62fdbde1]
godot-cpp version
4.4 [269c925]
System information
Godot v4.5.1.stable - Pop!_OS 22.04 LTS on X11 - X11 display driver, Single-window, 3 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Ti - AMD Ryzen 9 7950X 16-Core Processor (32 threads) - 61.94 GiB memory
Issue description
In #1747, we added the "use_static_cpp" flag for Linux, and made it enabled by default
However, in my testing, this appears to break reload. :-/ Specifically, it prevents Godot from loading the new versions of any virtual methods. Other aspects of hot reload may still work, but I'm not sure
For reusable GDExtensions (ie not ones with game logic), enabling "use_static_cpp" makes sense as a default. However, for ones that include game logic, reload is very important!
We have a couple options:
use_static_cppdefault to disableduse_hot_reloaddefault to disableduse_static_cppifuse_hot_reloadis enableduse_hot_reloadifuse_static_cppis enableduse_static_cppto still work withuse_hot_reload?Unfortunately, I have no idea how to do nr 5
I kind of wish we could do nr 2, but that's been the default for so long, it would be pretty disruptive. (This also applies to nr 4, which would effectly lead to nr 2, since that would be what happens with no options.)
So, only nr 1 and nr 3 are really viable, given that
use_static_cpphas only been around for a short timeSteps to reproduce
Nodethat prints something in_process()Minimal reproduction project
Haven't had a chance to make one (but would probably be useful if other folks want to look into it)