Skip to content

Godot 4.5 documentation/completion in hot-reloading not working; but also works? #1847

@NexushasTaken

Description

@NexushasTaken

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.

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

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:

ClassDB::bind_method(D_METHOD("foobar"), &ExampleClass::foobar);

bottom of the example_class.cpp file:

void ExampleClass::foobar() {
  print_line("Hello from foobar()");
}

In the ExampleClass:

void foobar();

Recompile the gdextension using:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis has been identified as a bugregressiontopic:gdextensionThis relates to the new Godot 4 extension implementation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions