Support .plugged within addons folder#37
Conversation
|
Nice work on this fix. One thing I am noticing in testing this is that having the repos in the .plugged directory is causing conflicts as Godot tries to load both the copies in the addon directories as well as the original in .plugged. It might be a good idea to move the files rather than copying to avoid having the engine try and load them twice. |
|
Hm I'm not seeing that, seems to play nice for me so far whether or not I've added a .gdignore file to .plugged. Godot should ignore hidden directories, and the LSP shouldn't print the warnings now that those are within the addons folder. Godot version? Are you having this issue with any plugin or maybe some particular ones you can share? Seems to be improper behavior on Godot's side unless I'm missing something. |
Changing the intent of this PR to only *support* .plugged within the addons folder, instead of actually changing the defaults
|
Thinking about what @imjp94 about automated migration. I have a proposal for supporting that in a more general way, but it should be a separate PR and not included in this which I'd consider a bug fix since the I've changed the name of this PR and pushed another commit so it only includes the fix for file copying behavior. |
|
I am running The addons are already being loaded from the matching In this case, the addons are from a repo that hosts multiple godot addons kenyoni-software/godot-addons where I am only choosing to download a subset of the addons using gdplug's include parameter.
I would have agreed with you but after this discussion godotengine/godot#93889 the godot maintainers suggested that all third party code should be placed within the |
|
I've been trying but haven't been able to reproduce the issue with Godot parsing But I did just sort of add a fix for the issue with kenyoni-software/godot-addons polluting the plugin root due to its internal addon folders - made it so an include/exclude can be specified with "res://" to tell gd-plug it should check for inclusion at the plugin root. (happy to make that a separate PR but I don't want to just make a ton of PRs) I also changed the exclude behavior to quit recursing for that directory immediately upon spotting a path which should be excluded, this makes it much easier to debug what's going on just since the list of files it checks is shorter I didn't commit changing the default include to "res://addons" to reflect this, but I think it should be |
I agree, but I think the way to do it is first add support for it, then add handling of orphaned I'm also wondering if with Godot's import issues it should be an option to simply not keep plugin repos around after installation. Figure keep the config in |
This did fix the issues. I did not know about .gdignore, thanks! Perhaps gd-plug should create that file after running install. |
Fixed the issue in #33 (comment) , in this implementation whether or not to include/exclude files is only determined from the plugin root. This seems like the sanest behavior to me. This fixes #32
For more information on what the issue with that implementation, default "addons" include was matching on "res://addons/gd-plug/.plugged" and attempting to copy all plugin files, then aborted when file overwrite was attempted.
This might need another change to handle the case of copying files from the project root, but I'm not aware of any case where gd-plug should ever be doing that, so not sure how to go about testing that case.