On Tue, Aug 23, 2011 at 08:37:09PM +0400, ZyX wrote:
> Reply to message «Re: :python forwarding to :py3 and vice-versa in case of 
> incompatibility», 
> sent 15:57:44 23 August 2011, Tuesday
> by Roland Puntaier:
> 
> > Here I meant the scenario, where we would go without loading the python
> > shared object (SO).
> > Then we would have to do a AC_DEFINE() in the configure.in with the
> > version.
> > In that scenario has('python3') would not load the SO, but since
> > configured, would return true.
> I suggest seeking for more information at this point: at least, check whether 
> python3 so or, especially, DLL exists and only then return true. Especially 
> because if I am not mistaking, vim without cream is compiled with py3 
> support, 
> but this does not guarantee that :py3 will actually work (in my Gentoo adding 
> python USE flag to vim will also install python, so this is not a problem).
> 
> Won't the following work: fork and load library in child, then make it report 
> about errors and exit?

Another option is to make the language-binding code standalone modules
that are linked with the relevant libraries and Vim dlopen()s the
language modules (as Danek Duvall suggested[0]) instead of having the
language bindings dlopen() the language libraries.

This would also fix the current problem that's preventing me from
enabling dynamic loading for the Debian packages (and I'd imagine
similarly for other binary distributions).  Basically, the current
implementation makes it difficult to properly express the library
dependency, so when a new version of the library is introduced there's
no easy way to know whether Vim needs to be rebuilt to work with the new
library version (c.f., discussion in Debian's BTS[1]).  With the
standalone modules, it's obvious what the library dependency is since
the module is directly linked to the library.

[0]: http://thread.gmane.org/gmane.editors.vim.devel/22759/focus=22765
[1]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611573
-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui