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
Create DSL for hooks #81
Comments
I don't like creating a new DSL right now. If you have time and want to maintain it I don't mind. I'd like to understand how I'd like see Vim's future first which will take a couple of month - I have more important stuff to be done at the moment. I agree that we need some "declarative" way to specify some hooks, so that hooks can be used by multiple manager solutions. |
Yes, the current hooks features are only for VAM. But I don't want to use new DSL... |
This variant is not declarative. |
To keep the long story short: Then we could introduce a new plugin "build-utils" which runs make or But why do we as plugin manager maintainer have to care about all Eg vim-addon-async does compile its sourcefile itself - all you need is But the real problem is VimL - its not suited to do such cross platform Another solution would be installing a binary version of the plugin / or Of course this does not work for tools which interface with setup such I feel we should try to hard to keep our workload as small as possible
I got it, there is one reason why the "plugin manager" must do all the |
There is a reasoning behind DSL. Personally I am fine with the current state, but for the reasons explained it does not work well as a universal format. I would expect alternative solution, “don’t want” is not constructive. |
Well, but we must make parser for parsing DSL. |
It does not matter how many plugins are supposed to be compiled. Once you have said async the whole installation process should be async. It does not matter whether or not there is more then one process requiring hooks (_WARNING_ hooks are not only doing compilation), in any case there is no good way to use vim from background. I should also add one feature to #82: automatic creation of specs for RPM/deb and ebuilds. |
I designed it simple enough for it to take at most a few hours in any language I have ever written any projects with (including C, though “few hours” is much greater in this case). |
OK. |
Excerpts from ZyX-I's message of Thu Jan 09 15:10:38 +0100 2014:
But let's summarize:
The gentoo/portage pypi whatsoever thing clearly indicates that it would
(This is not even a draft ..), then both VimL VAM like managers or code
map call supporter#IfReady(g:plugin.declarative_list_of_things_to_be_done_first, 'then execute this viml code) but g:plugin is bad, beacuse tools creating gentoo ebuilds cannot read
if the plugins had update and install hooks they could do what they Again - the addon-info.json would solve it (its the only sane way IMHO), Does it make sense to start a list of packages and patches to get a sane Marc Weber |
Bottom of this page: I've tried describing the problem briefly, let's collect what we need to I'll add a pointer to vim-pi's readme so that we can keep a list of |
Because otherwise it is taking way too long time. Why download if you don’t use plugin ATM?
Are we discussing transfer of the responsibility of compiling package from VAM to plugin or discussing a new hooks format?
They do expect it when they install. When they instruct plugin manager to install. Every package manager does compilation during installation. Adding compilation time to download time is acceptable, especially for vim plugins where compilation (if any) is usually faster then download. Even if it is 1 minute Once PM asks me whether to compile it I will start looking for alternatives. It forces user to do heavy context switches in this case.
We have one use case: just installs. The only difference are paths. I do not see any arguments for splitting installs: it is overcomplicated without benefits (lazy loading is not the one).
You have not added
We already have different commands for updating and first installation.
Using vim search in |
If we agree to move there I will export all issues and shut down any discussion here. |
This is hooks modifications I was talking about in #80.
Proposed DSL capabilites:
Reasoning about ERE: ERE regexes are simple and can run without modifications on most regex engines.
Suggested syntax: a list of lines in the form
COMMAND ARGS
. Expressions syntax: sequence of tokens (values and functions) in suffix notation (as it is very easy to implement). E.g.. Expressions here:
/
,'
,"
,(
,&
,$
, a digit or an uppercase letter is a raw string literal. It will end with either<Space>
,)
or a newline/end of string.(
it is a complex expression which is expected not to contain any)
except for inside quoted string. Such expressions consist of a sequence of expressions except for parenthesized ones./
,'
or"
is a string literal with different style of quoting:/
uses repeated quoting (///http://abc.def///
): it starts with any positive amount of slashes and ends with the same amount.'
uses regular vim quoting style:'abc''def'
."
uses JSON escapes (note: only JSON escapes).&
denotes a variable name. This name ends in the same fashion as raw string literal.$
denotes an environment variable name.Built-in types: string, integer, boolean.
Note about
IF
: its syntax isIF {expr} [{operator} {expr}]
.IF PLATFORM IS windows
does not use infix notation. Also acceptedIF (make command EXISTS)
.Complete list of commands:
Complete list of functions:
Note about VimL implementation: current directory and environment variables manipulation capabilities should not alter user environment (i.e. restore state afterwards).
Reasoning: it is assumed that hooks will be used in cases when vim is hard to use: e.g. if you want parallel installation you either have to spawn a separate vim instance or parse hook with python/ruby/etc, same for installation using command-line utilities.
As hooks are meant to be cross-platform you may not expect sed or coreutils being there. Thus main function of the DSL is to contain cross-platform implementation of SUBSTITUTE and file/directory manipulation functions.
The text was updated successfully, but these errors were encountered: