[dev] [vis] vis lua integration not working when using lua 5.3

From: Silvan Jegen <s.jegen_AT_gmail.com>
Date: Wed, 20 Jan 2016 15:07:28 +0100

Hey hey

When building vis with lua 5.3, the lua integration does not seem to
work for me even though vis compiles without issues.

$ make
cc -DCONFIG_LUA=1 -DCONFIG_SELINUX=0 -DCONFIG_ACL=0 -I/usr/include/ -D_GNU_SOURCE -std=c99 -Os -DVERSION="v0.1.r63.ge1bf543" -DNDEBUG -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DLUA_COMPAT_ALL buffer.c libutf.c main.c map.c register.c ring-buffer.c text.c text-motions.c text-objects.c text-regex.c text-util.c ui-curses.c view.c vis.c vis-cmds.c vis-lua.c vis-modes.c vis-motions.c vis-operators.c vis-prompt.c vis-text-objects.c -llua -ltermkey -lncursesw -lc -o vis
$ ldd vis
        linux-vdso.so.1 (0x00007fffaf390000)
        liblua.so.5.3 => /usr/lib/liblua.so.5.3 (0x00007f841b31e000)
        libtermkey.so.1 => /usr/lib/libtermkey.so.1 (0x00007f841b114000)
        libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007f841aea7000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f841ab03000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f841a8ff000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f841a601000)
        libunibilium.so.0 => /usr/lib/libunibilium.so.0 (0x00007f841a3ef000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f841b558000)


I investigated it somewhat. It is the lua_pcall at vis-lua.c:666 (!) that
fails when loading a file (in the lua runtime) by throwing the following
error.

 /home/silvan/build/vis/lexers/themes/default-256.lua:23: attempt to index a nil value (local 'lexers')

the local 'lexers' variable should be initialized in the first non-comment
line of the default-256.lua (solarized.lua) file which does not seem
to work.

Has anyone used vis successfully with lua 5.3? Does anyone know what's
going wrong or should I invest more time to figure it out (I have a hunch
people more familiar with lua will find the issue much faster than me)?


Cheers,

Silvan
Received on Wed Jan 20 2016 - 15:07:28 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 20 2016 - 15:12:15 CET