martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.19k stars 259 forks source link

lua: lpeg module isn't actually optional #1119

Closed donaldcallen closed 10 months ago

donaldcallen commented 10 months ago

Having built vis from source on FreeBSD 13.2 (up-to-date), when I start vis, I get

/usr/local/share/vis/vis-std.lua:20: attempt to call a nil value (field 'load')
/usr/local/share/vis/plugins/filetype.lua:503: attempt to index a nil value (field 'property')

in a separate (debug?) buffer. Below that buffer, it says "WARNING: could not find lpeg module"

This issue occurs with both lua5.4 and lua5.3 (after having made the fix to vis/configure given in my pull request of a few minutes ago, without which, vis configure does not see lua5.4 even when installed). I usually install built-from-source packages with the --prefix /usr/local/from_source. I did this at first with vis, had this problem, and tried the default prefix, which had no effect.

I've done the same installation on an Arch Linux system with no trouble.

rnpnr commented 10 months ago

This occurs because you don't have lpeg installed (on FreeBSD lua-lpeg is the port name). Its meant to be optional but at some point that stopped being the case. I will try to fix it later.

donaldcallen commented 10 months ago

Thanks very much -- that does fix the problem.