-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Ensure excluded GDExtension files are not included in extension_list.cfg
#97216
Ensure excluded GDExtension files are not included in extension_list.cfg
#97216
Conversation
I implemented what seems like a straightforward way to address this error message, by filtering out the files in the extension_list.cfg file during the process of exporting. This seems pretty low risk, but I welcome more eyes on the change. I tested with both a project with only one extension (which was excluded), and one with two extensions (one of which was excluded) per the minimal reproduction projects supplied in the issue. |
extension_list.cfg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I didn't test this, but looking at the code, this seems like a good approach overall :-)
I only have the one note below...
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.
9c1d5e7
to
c57eaf7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! The latest changes look good to me. I haven't re-tested, but I don't think anything has changed functionally since the last time I tested
Thanks! Congratulations on your first merged contribution! 🎉 |
Does not work for me. I excluded all extension's files with EditorExportPlugin and it's still included in the extension list and prints errors on launch. |
I definitely didn't test with EditorExportPlugin, only the traditional Export dialog, so there must be something else when you are using that class. I didn't even know about that class, so that's a bit of new learning for me. I'm curious though, so I'll see if I can see what that class does differently. Do you have an example EditorExportPlugin I could test with? |
Check this comment: godotengine/godot-git-plugin#77 (comment) |
I looked at this and see that the list of paths to process is not updated if a EditorExportPlugin uses the skip() method to drop it from the export list. I'll write a separate issue and see if there is a way to generalize this. If you are are using the EditorExportPlugin just to exclude the git plugin, the easier way is to just use the export resource options and select the directories without using a plugin. |
Well, after doing some additional testing on my "fix" I realized that there were other changes in 4.4 that make supporting an editor export plugin excluding a GDExtensionPlugin like the Git plugin pointless. I closed issue: #99698 The root problem is that there are two export plugins competing for control of the same files, and there is no guarantee of the order they will run in, and the GDExtensionPlugin has now implemented additional warnings without the knowledge of any other editor export plugins running. Oh well. |
I haven't looked into the details, but I just want to make sure we're not adding workarounds to solve a symptom instead of handling the root problem properly. The Git plugin is obviously a type of extension that nobody would want included in exports. So the extension system needs to have support for extension authors to register their extensions as editor only / no export, and this should be used for the Git plugin. End users shouldn't have to manually exclude its files from the export presets. |
Well that is the current strategy to prevent the files for an addon that is only for the editor from being in the exported package when they export their game. That is independent of whether it had a GDExtension or not. In the case where there was an GDExtension there was an extra twist to keep out just the line for that unwanted extension from extension_list.cfg. Are you suggesting to add an option into plugin.cfg that would describe this plugin as being for the editor only? That seems like it would make all the user's lives considerably easier. |
I think adding some sort of "no export" key to |
Sounds like this discussion should be tied into whatever proposal is tracking this potential feature. In the meantime people will just have to manually exclude this type of addon. Is there a link to the global extension proposal? |
Here's the proposal but I don't think it captures all of the discussion that has gone on around this |
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.