godotengine / godotengine/godot-cpp
Godot 4.5 documentation/completion in hot-reloading not working; but also works?
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
### Godot version
4.5.stable.official.876b29033
### godot-cpp version
4.5
### System information
Archlinux, Intel Core i3-3245, Integrated Graphics. Wayland with Hyprland
### Issue description
After upgrading my project from **v4.4.1** to **v4.5**, I re-dumped the extension API and interface, then recompiled it. Everything worked as expected, the GDExtension runs correctly when running the project.
However, when I modify the GDExtension and recompile it **while the editor is running**, the documentation and code completions related to the GDExtension stop working. It's as if the editor doesn’t reload the extension.
Even so, running the project still works. Also, if I relaunch the editor, the documentation and completions work again.
The issue only occurs when recompiling the GDExtension while the editor is running, then documentation and completions suddenly stop working.
I tried the same process with **godot-cpp-template**, using Godot 4.5 and upgrading the template. The same thing happens: after compiling the GDExtension, documentation and completion disappear.
### Steps to reproduce
I made a fork of godot-cpp-template.
```sh
git clone https://github.com/NexushasTaken/godot-cpp-template.git -b issue
cd godot-cpp-template
scons target=template_debug debug_symbols=yes use_hot_reload=yes generate_bindings=yes use_llvm=yes build_library=yes platform=linux
```
open godot
```sh
godot --path demo -e
```
Try running the project; it should work.
Next, on the issue, **do not relaunch the editor**.
Just add new simple methods using `ClassDB::bind_method` in `ExampleClass::_bind_methods`.
on `ExampleClass::_bind_methods`:
```cpp
ClassDB::bind_method(D_METHOD("foobar"), &ExampleClass::foobar);
```
bottom of the `example_class.cpp` file:
```cpp
void ExampleClass::foobar() {
print_line("Hello from foobar()");
}
```
In the ExampleClass:
```cpp
void foobar();
```
Recompile the gdextension using:
```sh
scons target=template_debug debug_symbols=yes use_hot_reload=yes generate_bindings=yes use_llvm=yes build_library=yes platform=linux
```
And go to the editor, the documentation and completion shouldn't work, but running the project will work.
### Minimal reproduction project
N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.