fman-users / fman

Issue tracker for fman, a cross-platform file manager
https://fman.io
240 stars 3 forks source link

fman should (be able to) auto-update plugins #149

Open mherrmann opened 7 years ago

mherrmann commented 7 years ago

This was also pointed out by @raguay. Somebody (was it you @kek91?) asked to be able to disable this functionality.

kek91 commented 7 years ago

Yeah, or what I really want is to be asked first. When opening fman I'd like it to show me a dialog prompt to ask if I would like to update the plugins (only show if any plugins are out-dated of course).

If I'm the only who is interested in this optional update feature, then I'd appreciate a variable in Core settings.json to disable it manually :)

Sorry if I'm being a PITA :) But if you support my request, I would also like an option to update single plugins. For example, GoTo -> Update plugin -> select plugin from list.

Otherwise it's a bit tedious to uninstall and then reinstall the plugin

I guess it goes without saying this shouldn't be top priority, it's rather a quality of life improvement for some of us I suppose

mherrmann commented 7 years ago

Got it :-). Just one thing, fman will never show a prompt about updates because I personally find such popups too obtrusive. The config option + "Update plugin" command will let you get the same effect.

kek91 commented 7 years ago

Yeah that wasn't well thought out. Definitely avoid pop-ups :)

At best, you could show a notification on the status bar. When opening fman it would look like v0.4.1 Ready. X plugins are out-dated not sure if even that's needed though.

mherrmann commented 7 years ago

The way I'd like to do it is for fman to update plugins by default. When it does, it should say Plugin X was updated. When you disable this, I think fman will simply not do anything. You can then for instance manually use the "Update plugins" command to update whenever you're ready.

raguay commented 7 years ago

Why not do it like npm: have a file in the User directory that is Plugins.json and have each plugin with a version number and a auto update flag. That gives both flexibility and control to the user. When a new plugin is installed, then add the version number (or a version date which ever works easiier) to the file with the flag set to auto update. Then the savey user can flip this flag to not update that plugin.

mherrmann commented 7 years ago

That sounds like a great solution! I'm pretty certain I'll do it exactly like that. Thanks Richard.

raguay commented 7 years ago

Such a file would also make it easy to move your configuration to another system. Just copy the Plugins.json file mentioned above to the new setup and fman will install those versions of the plugins. But, that means the plugins would need older versions.

mherrmann commented 7 years ago

Yes, that would be useful.

What do you mean the plugins would need older versions? Do you mean that it should be possible to also install an old version of a plugin, even if a newer one already exists?

kek91 commented 7 years ago

If I understand Richard correctly then yes In Cargo and many other dependancy/package managers you can choose which version to install. Don't have too much experience with npm but I guess the version number stated in Plugins.json is the version that will be installed by fman (unless it has enabled auto-updating (which is default), then it will take the latest version).

mherrmann commented 7 years ago

Plugins.json could look as follows:

{
    "kek91/StatusBarExtended": {
        "version": ">=0.1.1"
    }
}

This would auto-update. The following would not and keep it at version 0.1.1:

{
    "kek91/StatusBarExtended": {
        "version": "0.1.1"
    }
}
pravic commented 5 years ago

I would also like an option to update single plugins. For example, GoTo -> Update plugin -> select plugin from list.

Or in the same way as Sublime Text does (well, PackageControl plugin):

Upgrade Package -> list of outdated plugins Upgrade/Override All Packages