You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Referencing #33 (comment) where it's mentioned a proposal to move the default plugin directory causes bad behavior for the end user. I am in support of changing the default directory but I think the fix migration-wise is not any sort of automated migration but instead handling the general case of finding .plugged outside of where gd-plug thinks it should be.
There are a couple steps for this.
1. Move directory configuration into res://plug.gd, only falling back to default directory
eg
func _config():
plugged_dir = "addons/"
This ensures that the .plugged directory won't change for a user when updating via upgrade, it feels like something that should be user configurable. Thinking this should not be added with the default path when creating res://plug.gd, but should be added to documentation
2. Search for other .plugged directories if .plugged isn't found at plugged_dir path
If .plugged isn't where it's expected to be in _plug_start(), scan the project for .plugged directories.
If no .plugged directory is found elsewhere, create it.
If another .plugged directory is found:
If ENV_FORCE is set, delete it
Otherwise, warn the user and quit with an error message, something like
.plugged directory found at unexpected location
.plugged directory location: "res://wherever/.plugged"
expected location: "res://.plugged"
If this is unintentional, run command again with force
If this is an intended overridden .plugged folder path, add configuration to plug.gd:
func _config():
plugged_dir = "res://wherever/.plugged"
Handling the case of changing the default .plugged directory?
With these changes so far, I believe changing the default location of the .plugged folder requires only one forced upgrade by the end user and no manual file manipulation. I think this is probably ok and maybe even preferred since users may have to update their .gitignore or other files and should be aware of the change
Maybe add a more specific warning if the .plugged location is changing from res://.plugged to res://addons/gd-plug/.plugged.
gd-plug x.x.x has changed the default directory where it keeps plugin repos from "res://.plugged" to "res://addons/gd-plug/.plugged", you will have to force install once or remove the existing .plugged directory manually
Alternatively, more seamless for a casual user, would be that since upgrade uses force mode anyway, upgrade could just set force before _plug_start and then its handled automatically
The text was updated successfully, but these errors were encountered:
Referencing #33 (comment) where it's mentioned a proposal to move the default plugin directory causes bad behavior for the end user. I am in support of changing the default directory but I think the fix migration-wise is not any sort of automated migration but instead handling the general case of finding
.plugged
outside of where gd-plug thinks it should be.There are a couple steps for this.
1. Move directory configuration into
res://plug.gd
, only falling back to default directoryeg
This ensures that the .plugged directory won't change for a user when updating via
upgrade
, it feels like something that should be user configurable. Thinking this should not be added with the default path when creatingres://plug.gd
, but should be added to documentation2. Search for other
.plugged
directories if.plugged
isn't found atplugged_dir
pathIf
.plugged
isn't where it's expected to be in_plug_start()
, scan the project for.plugged
directories.If no
.plugged
directory is found elsewhere, create it.If another
.plugged
directory is found:Handling the case of changing the default .plugged directory?
With these changes so far, I believe changing the default location of the .plugged folder requires only one forced upgrade by the end user and no manual file manipulation. I think this is probably ok and maybe even preferred since users may have to update their .gitignore or other files and should be aware of the change
Maybe add a more specific warning if the .plugged location is changing from res://.plugged to res://addons/gd-plug/.plugged.
Alternatively, more seamless for a casual user, would be that since upgrade uses force mode anyway, upgrade could just set force before
_plug_start
and then its handled automaticallyThe text was updated successfully, but these errors were encountered: