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

Export of GDExtension files that were excluded still appears in extension_list.cfg resulting in errors during startup #97207

Open
markeel opened this issue Sep 19, 2024 · 0 comments · May be fixed by #97216

Comments

@markeel
Copy link

markeel commented Sep 19, 2024

Tested versions

Problem found on v4.3.stable.official [77dcf97]
This problem appears to have existed in earlier version as well

System information

Godot v4.3.stable - Ubuntu 24.04.1 LTS 24.04 - Wayland - Vulkan (Forward+) - integrated Intel(R) UHD Graphics 770 (ADL-S GT1) - 12th Gen Intel(R) Core(TM) i7-12700K (20 Threads)

Issue description

When an export is performed with a GDExtension that extension is listed in the extension_list.cfg file in res://.godot

Even if the files that go into that extension are excluded from export (such as would be done for the Git plugin (which is editor only)) this file causes the exported binary to look for that extension. It cannot be found and an error is output.

This has been reported against the godot-git-plugin, but the real issue is the way an export ignores the exclusion filters for the contents of the extension_list.cfg

Steps to reproduce

  1. Create a project that includes a GD Extension that is for the editor only (such as the official Git plugin),
  2. Export that project and exclude the plugin folder by doing Resources->Export Mode = "Export all resources in the project except resources checked below", and clicking "addons/godot-git-plugin" folder
  3. Run the exported project and observe the error: "ERROR: Error loading GDExtension configuration file: res://addons/godot-git-plugin/git_plugin.gdextension"

Minimal reproduction project (MRP)

There are 2 cases

  1. Where the only GDExtension is the add-on that is excluded
  2. Where there is a GDExtension in addition to the add-on that is excluded.
    one-extension.zip
    gdextension_example_cpp.zip
markeel added a commit to markeel/godot that referenced this issue Sep 20, 2024
The implemented solution to the problem of the error message
appearing when an excluded GDExtension in an export of a project, is
to filter the lines in the extension_list.cfg file to only include
those that are in the paths actually included for export.  If there
are no entries remaining, don't write the file at all.
@akien-mga akien-mga added this to the 4.4 milestone Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants