-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Implement support for updating plugins inside the editor #8451
Comments
I like the idea, this was also recently implemented in Dialogic and it would have been nice to have a standardized way of doing it, but there is one thing that needs to be discussed: How/where is it calling for updates? If the plugin is going to be "calling home", we need to inform the Godot user that it will be doing that and you have to approve/trust the dev individually. Because if I specify from my plugin to send data to my server to check for updates, you can also send some extra data without the user knowing. I know this issue is also present in the current way; a plugin developer that implements their own auto-update feature could also do the same, but if we are providing a "built-in" way of doing it integrated from Godot's UI, we should consider how to properly manage permissions. Other than that, I really like the idea of standardizing this, and it is something that I'm sure we'll have to be implemented in one way or another eventually. |
totally agree. godot should have something like pip to python a decent way to manage dependencies. |
There are already few addons/tool that try to be npm for godot:
Godot should use someting like this. Also some addons like those for example:
should be instalable on editor side and not that developer must to install it per project. |
This proposal does not aim to provide a dependency management tool but rather to provide an update mechanism from within the editor. |
I love how you make this specifically only about updating, and not dependency management. Dependency management is super hard and with the current add-on infrastructure even harder. Therefore this could be a simple way to provide the core functionality of updating in a very self-contained fashion! To @coppolaemilio's point of where it checks for the version: I think we should limit this built-in functionality to the AssetLib, and therefore check the AssetLib for the version. |
This requires something like #7925 to be implemented, as there is no way for add-ons to declare a method to check for updates (let alone in a decentralized manner). Keep in mind some assets aren't offered on the asset library (such as some paid assets being offered on itch.io), and you should be able to check for updates for those too (even if there is no autoupdate functionality provided). Making plugins integrate their own updater code is bound to cause a lot of issues (including potential security issues), so I think it should work in a purely declarative way. |
The issue with only checking with the Asset Library is that the user could change the lib they are pulling from, and a user could just download an addon directly from a website and add it to their projects without the AssetLib. So I imagine the plugin developer should be able to have a say about where it will be pulling the update info from. I guess the default can be the asset lib, but we should also have in mind to provide other sources. |
This proposal purposefully goes down that path of having to integrate your own updater code to provide the flexibility of using various download sources and avoid early standardisation. Developers of plugins already offer updaters out of the box (which imposes security risks) so rather than preventing users from doing certain things, I advocate the opposite. However, the security concerns both raised by @coppolaemilio and @Calinou are very valid. To combat this, we may need some sort of functionality that when reaching out to a "non trusted" source, Godot itself prompts the user with a popup that cannot be circumvented by the addon developer. IntelliJ has something like this as well:
This at least gives the user the control over when something gets downloaded. I believe this is the best trade off between allowing both users and addon developers enough freedom but also giving them responsibility of making sure that they don't go off and download dodgy files. |
Thank you for creating this suggestion. This was exactly my problem, and I had to write my own update mechanism for my plugin.
I would therefore suggest introducing a new plugin tool class that you can optionally define in your plugin.
The new Godot tool class could be named
|
Godot is sorely lacking a more mature system for managing plugins. I think showing a pop-up that installed add-ons are out of date according to the assetlib version is a minimum step while waiting for something better to come along. Here's why I have issues with my team:
I love Godot and I'm involved in helping maintain several addons, but the system needs to be improved. |
@Loufe It sounds like all of your issues extend from not having your plugins in git. I have a large team and many plugins, all in git without issue. I maintain the exact version of each plugin I want in the repo. I'm also a plugin dev. When I'm ready with a new plugin version that I've tested, my own or others, I upgrade it in the repo. Everyone downloads updates as normal. The only exception is we have one C# plugin that only 3 people use with the C# version of Godot. We have excluded that from git, and those 3 people have local installations of the plugin, after I send them the zip. This is purely because that plugin has a commercial license. Otherwise we would put it in our repo. Everyone else uses only the GDScript and C++ plugins. Managing plugins in Git is not any different for us than any of the other code or assets in our project. They're just files in another directory. |
@Loufe you can also check a plugin manager-like addon, seems like it would help in some of the pitfalls you're facing by not git-including all addons, such as https://github.com/imjp94/gd-plug |
Godot can already go to a web-server (the Asset Library), so "phoning-home" is moot. This proposal is great. |
You can't even download the plugin again (from Asset Libary) to update. You need to delete the addon folder first, to resolve the conflicts. We need a overwrite option. But I would clear the folder first. Otherwise you'll have old dead files in the folder. A plugin download always contains all the required files. The
My current update process is to find the plugin in Asset Libary, then delete the addon folder and download again. Then restart Godot. So the updater needs to be reload the plugins or inform about restart. |
|
I don't love to look up the Godot asset Library, many plugins are developed in GitHub or GitLab. I'm the dev of
This works fine since around 4 years. |
True that. But if the Asset Library improves it will be the better source for trusted addons etc. I also worry that "Git**b" will get hardcoded in and relying on anything as much as we do on Github is always a bad idea. |
Describe the project you are working on
I am working on an untitled RPG (project name "cave"), as well as maintaining several Godot addons called beehave and pandora.
Describe the problem or limitation you are having in your project
While developing editor plugins and using them, keeping them up to date is a challenge. This involves manually checking either the asset library or Github to see if a new update is available.
Some plugins such as pandora and gdUnit4 have an auto-update functionality in-built, but for any other addon, the maintainer would require to build such functionality themselves.
The downside of this becomes apparent once using multiple addons, perhaps even in a double digit count. Keeping them up-to-date is a pain and requires serious effort to understand which ones to update, which ones may break compatibility etc. - to make matters worse, for the existing addons that support auto-updating, they need to be updated one by one and each brings an inconsistent user journey to how to update addons.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
This proposal aims to provide an auto-update experience to users of the Godot editor, while also not trying to force a specific way onto addon developers to update their addons. Inside the project settings there is a Plugins tab. Navigating there shows all the plugins that have a new version available, as well as a button to update them all:
Clicking "Update all" will automatically download the new versions of each addon and update it respectively. In case an addon requires an editor restart, it will prompt a popup that an editor restart may be required.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The idea of this proposal also is to give the plugin developer the control over how their addon gets updated, rather than forcing a standardization on them. A developer of a plugin may choose to host their plugin code in a very specific place (like Github) and the Godot editor cannot infer that information always. This can be achieved in two ways:
Approach: dedicated
AutoUpdatePlugin
Inside the
EditorPlugin
there could be two new methods being exposed as follows:In there, addon developers can add custom code to check if a new version is available, as well as code to auto-update it. This approach considers that each developer may have their own custom versioning (so it is up to them to know what it means to have a new version), as well as providing a way to check/download addon versions.
Q & A
_version_to_number
or_get_current_version()
could be exposed somehow insideEditorPlugin
or being made available via a helper nodeIf this enhancement will not be used often, can it be worked around with a few lines of script?
N/A
Is there a reason why this should be core and not an add-on in the asset library?
This is already part of addons but it is annoying and cumbersome from an "update journey" perspective.
The text was updated successfully, but these errors were encountered: