imjp94 / gd-plug

Minimal plugin manager for Godot
MIT License
215 stars 15 forks source link

Autoload script not removed #28

Open IceflowRE opened 1 year ago

IceflowRE commented 1 year ago

autoload script references in project setting are not cleared as plugin uninstalled. Workaround: Manually remove autoload scripts from project setting

Can elaborate what does this mean? So if a plugin has an autoload, that autoload is not removed on uninstalling the plugin?

imjp94 commented 1 year ago

Yes, but it is just the "reference" of autoload that got left in project.godot, while the script itself will be properly removed.

For example, this is what might happen to project.godot after uninstalling a plugin with autoloads:

[autoload]

Yafsm="*res://addons/imjp94.yafsm/YAFSM.gd" # Doesn't exist anymore

And editor will start popping warnings about missing autoload script

IceflowRE commented 1 year ago

OH, just tried gd-plug and plugins are not enabled after installation or disabled before uninstall. Is there any reason why you do not enable/disable them? This would avoid the autoload problem at all.

imjp94 commented 1 year ago

Hmm... Can't quite remember why I didn't disable the autoloads programmatically before uninstalling, maybe it is hard to locate autoloads owned by plugin that about to be uninstalled(I guess?) Might look into this again if I have time

IceflowRE commented 1 year ago

Hmm... Can't quite remember why I didn't disable the autoloads programmatically before uninstalling, maybe it is hard to locate autoloads owned by plugin that about to be uninstalled(I guess?) Might look into this again if I have time

You do not have to remove the autoloads of plugins, a plugin should do that on enabling/disabling itself.

imjp94 commented 1 year ago

I see, thanks for the info, will give it a try =)