-
-
Notifications
You must be signed in to change notification settings - Fork 687
Description
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_cppdefault to disabled - Make
use_hot_reloaddefault to disabled - Automatically disable
use_static_cppifuse_hot_reloadis enabled - Automatically disable
use_hot_reloadifuse_static_cppis enabled - Figure out some change to godot-cpp that allows
use_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_cpp has only been around for a short time
Steps to reproduce
- Make a GDExtension with a
Nodethat 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)