Skip to content
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

GetLatestVimScripts support #65

Open
ZyX-I opened this issue Mar 13, 2012 · 5 comments
Open

GetLatestVimScripts support #65

ZyX-I opened this issue Mar 13, 2012 · 5 comments

Comments

@ZyX-I
Copy link
Collaborator

ZyX-I commented Mar 13, 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.

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 by db/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 with db/patch.vim. I do not want this much because I am unsure that nobody has added something like “zip bomb” to the plugins.

@MarcWeber
Copy link
Owner

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

@ZyX-I
Copy link
Collaborator Author

ZyX-I commented Mar 14, 2012

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.

@MarcWeber
Copy link
Owner

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

@MarcWeber
Copy link
Owner

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

@ZyX-I
Copy link
Collaborator Author

ZyX-I commented Mar 14, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants