Open ZyX-I opened 12 years ago
Excerpts from ZyX-I's message of Tue Mar 13 20:14:35 +0100 2012:
As shipped with vim GetLatestVimScripts plugin has support for dependencies doesn’t it make sense to write enabled by default global post-install and post-update hook that will generate
addon-info.json
file out of GLVS-targeted comments in case it is missing. I didn't know that. How do those dependency comments look like?
In the end I'm not interested in supporting everything which could be supported. My vision is to make it easy for people to use Vim and its plugins. And solutions which do no longer fit todays habits (eg github) such as GetLatestVimScripts - I'm fine with documenting problems only until somoby asks for better support. On the other hand it looks like support can be added easily if names of dependencies can be mapped to our names easily.
If you feel that way do it - but I don't see need for it.
Marc Weber
In the end I'm not interested in supporting everything which could be supported.
This is why it is a hook even though hook does launch after info file is read. This will apply at next restart.
I didn't know that. How do those dependency comments look like?
" GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim
“884” is a script number and it is what matters. “AutoAlign.vim” is a comment, “:AutoInstall:” can be ignored (if I got it right it indicates whether installation should be performed manually due to some issues like requirements to run “ruby extconfig.rb”). More data at :h glvs-data
.
On the other hand it looks like support can be added easily if names of dependencies can be mapped to our names easily.
As you see above there are no relevant names, only numbers. And that can be mapped easily.
If you fix it also improve the "related work documentation" about GLVS. It should mention that GLVS also had a dependency feature (I didn't know about).
Marc Weber
Oh - you could run ActivateAddons in the hook to force installation immediately - not waiting for a restart. Then activation would even happen before activation of the main plugin - and everything would be perfect - because checkout should happen before activation, thus hook should be run before activation, .. ?
Marc Weber
It already runs before activation, in vam#install#Install
. Though in this case one probably has to allow user hooks (those that are stored in g:vim_addon_manager
) run after installation no matter whether opts.run_install_hooks
is true.
As shipped with vim GetLatestVimScripts plugin has support for dependencies doesn’t it make sense to write enabled by default global post-install and post-update hook that will generate
addon-info.json
file out of GLVS-targeted comments in case it is missing.It may also make sense to check whether
addon-info.json
contents (only dependency section, of course) matches GLVS-targeted comments in case it was added bydb/patch.vim
.As another solution I can try to write an addition to the cron job script which will install all plugins, check them for comments and thus populate
db/glvs.json
file which is to be merged withdb/patch.vim
. I do not want this much because I am unsure that nobody has added something like “zip bomb” to the plugins.