Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename all gdnative occurences to gdextension #69718

Merged

Conversation

groud
Copy link
Member

@groud groud commented Dec 7, 2022

I guess it's kind of needed before 4.0.

It at least compiles on my computer, so I don't think there are any rename that caused an issue for now. I hope I did not rename too much, though I checked most changes (translations and 3 to 4 converter renames were removed for example)

It will need a correspondind godot-cpp update though.

Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface

modules/mono/glue/runtime_interop.cpp Outdated Show resolved Hide resolved
modules/mono/interop_types.h Outdated Show resolved Hide resolved
@groud groud force-pushed the finally_rename_gdnative_to_gdextension branch 2 times, most recently from 629b634 to c5702c4 Compare December 7, 2022 12:40
@Chaosus Chaosus added this to the 4.0 milestone Dec 7, 2022
@groud groud force-pushed the finally_rename_gdnative_to_gdextension branch 3 times, most recently from 8839251 to e593393 Compare December 8, 2022 16:33
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Looks good!

Left a couple nitpicks but overall this seems ready to merge.

.github/CODEOWNERS Outdated Show resolved Hide resolved
core/extension/gdextension_interface.cpp Outdated Show resolved Hide resolved
core/variant/variant_internal.h Outdated Show resolved Hide resolved
@@ -423,7 +423,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" --doctool [<path>] Dump the engine API reference to the given <path> (defaults to current dir) in XML format, merging if existing files are found.\n");
OS::get_singleton()->print(" --no-docbase Disallow dumping the base types (used with --doctool).\n");
OS::get_singleton()->print(" --build-solutions Build the scripting solutions (e.g. for C# projects). Implies --editor and requires a valid project to edit.\n");
OS::get_singleton()->print(" --dump-gdextension-interface Generate GDExtension header file 'gdnative_interface.h' in the current folder. This file is the base file required to implement a GDExtension.\n");
OS::get_singleton()->print(" --dump-gdextension-interface Generate GDExtension header file 'gdextension_interface.h' in the current folder. This file is the base file required to implement a GDExtension.\n");
OS::get_singleton()->print(" --dump-extension-api Generate JSON dump of the Godot API for GDExtension bindings named 'extension_api.json' in the current folder.\n");
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should rename this one to --dump-gdextension-api to match --dump-gdextension-interface... but then should the JSON be gdextension_api.json 🤔

🥫 🪱

Scope creep anyway for this PR ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

You tell me. But I think I agree with the fact it could go in another PR 😁 .
I think we could discuss that in the GDExtension meeting, I'll add it as a topic to discuss.

main/main.cpp Outdated Show resolved Hide resolved
@groud groud force-pushed the finally_rename_gdnative_to_gdextension branch from e593393 to 09a4825 Compare December 12, 2022 09:55
Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
@groud groud force-pushed the finally_rename_gdnative_to_gdextension branch from 09a4825 to be1c9d6 Compare December 12, 2022 10:05
@akien-mga akien-mga merged commit f1edd03 into godotengine:master Dec 12, 2022
@akien-mga
Copy link
Member

Thanks!

@@ -2335,7 +2335,7 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const
static void _scan_extensions_dir(EditorFileSystemDirectory *d, HashSet<String> &extensions) {
int fc = d->get_file_count();
for (int i = 0; i < fc; i++) {
if (d->get_file_type(i) == SNAME("NativeExtension")) {
if (d->get_file_type(i) == SNAME("GDExtension")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I realize this PR was tagged as break-compat, so all bets are off I guess, but the changing of this file type seems to have silently messed with the loading of any extension that was loaded before this change was introduced.

I'm not sure I've pinpointed the exact reason, but it looks like the previous file type (NativeExtension) is cached in <project>/.godot/editor/filesystem_cache, and isn't invalidated by this PR nor its godot-cpp counterpart, which causes this function to skip over them.

I deleted the entire .godot folder for good measure, which seems to fix the problem.

I figured I should mention it in case anyone else comes asking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants