Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions binding_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ def _get_file_list(api, output_dir, headers=False, sources=False):
files.append(str((gdextension_gen_folder / "gdextension_interface.h").as_posix()))
files.append(str((core_gen_folder / "gdextension_interface_loader.hpp").as_posix()))
files.append(str((source_gen_folder / "gdextension_interface_loader.cpp").as_posix()))
files.append(str((core_gen_folder / "ext_wrappers.gen.inc").as_posix()))
files.append(str((core_gen_folder / "gdvirtual.gen.inc").as_posix()))
files.append(str((core_gen_folder / "ext_wrappers.hpp").as_posix()))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here for ext_wrappers.gen.hpp

files.append(str((core_gen_folder / "gdvirtual.hpp").as_posix()))

for builtin_class in api["builtin_classes"]:
if is_pod_type(builtin_class["name"]):
Expand Down Expand Up @@ -513,8 +513,8 @@ def generate_builtin_bindings(api, output_dir, build_config):
include_gen_folder.mkdir(parents=True, exist_ok=True)
source_gen_folder.mkdir(parents=True, exist_ok=True)

generate_wrappers(core_gen_folder / "ext_wrappers.gen.inc")
generate_virtuals(core_gen_folder / "gdvirtual.gen.inc")
generate_wrappers(core_gen_folder / "ext_wrappers.hpp")
generate_virtuals(core_gen_folder / "gdvirtual.hpp")

# Store types beforehand.
for builtin_api in api["builtin_classes"]:
Expand Down
2 changes: 1 addition & 1 deletion test/src/example.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#endif // GODOT_VERSION_MINOR >= 4

#include <godot_cpp/core/binder_common.hpp>
#include <godot_cpp/core/gdvirtual.gen.inc>
#include <godot_cpp/core/gdvirtual.hpp>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this file is called gdvirtual.gen.h in Godot, I think I'd prefer we call it gdvirtual.gen.hpp in godot-cpp (with the gen in there)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .gen is only a convention because it lets us automatically ignore those files in Git. Because we already have a generated folder, the files are already ignored, so there's no need for it to use .gen.hpp

Copy link
Collaborator

@dsnopek dsnopek Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not thinking about the files in the file system, but developers renaming their includes between a module and godot-cpp

I feel like it's slightly less confusing to have to switch between #include "core/object/gdvirtual.gen.h and #include <godot-cpp/core/gdvirtual.gen.hpp> without having to remember that you also need to drop the gen part for some reason


using namespace godot;

Expand Down
Loading