Wireshark-dev: Re: [Wireshark-dev] Lua update?
From: João Valverde <[email protected]>
Date: Sat, 14 Jul 2018 10:36:46 +0100

On 12-07-2018 21:04, Peter Wu wrote:
On Thu, Jul 12, 2018 at 07:13:21PM +0000, Maynard, Chris wrote:
Release notes for 5.3: http://www.lua.org/manual/5.3/readme.html

It’s possible that there are incompatibilities, which would necessitate modifying Lua scripts , but for me personally, I don’t mind changing my scripts if I have to.  In fact, I *want* to change my scripts in order to make use of some new features, in particular the bitwise operators[1].  To me, the perfect time to update would be for the next Wireshark 3.0 release.

Previous discussion starts here: https://www.wireshark.org/lists/wireshark-dev/201608/msg00082.html.
Maybe João, Pascal, Peter, Hadriel and others would like to weigh in again here?
I was previously concerned with backwards compatibility, but if Lua 5.3
is reallt that attractive, it might be an option to drop support for
older Lua versions (5.1/5.5) and require 5.3 for Wireshark 3.0 (or
whatever new major release). That also makes life easier for Lua
dissector developers who only need to support one version instead of two
(currently 5.1 and 5.2).

When doing so, it is possible that some older dissectors or plugins
cease working. Those depending on the "bitop" module (which exposes
functions such as "bit.lshift(1, 2)") should change their scripts to use
the new syntax in Lua 5.3 ("1 << 2"). Then the "bitop" module would have
to be dropped since it no longer compiles with Lua 5.3:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10881

For some reason, the luabit library is not documented in the Developer's
Guide nor covered by tests. I guess this is a good reason to drop it.
Should the Lua API be extended in the future, it must be covered by
tests such that it clear which public parts are stable.

One potential problem is that even Centos/RHEL 7 still do not ship with
Lua 5.3, they include Lua 5.1 only. EPEL7 has no newer version either.
Debian ships with Lua 5.3 since jessie-backports. Ubuntu ships with it
since 16.04 (and not 14.04).

To make Lua 5.3 available for these Linux distributions, the Lua 5.3
would have to be built as part of the Wireshark build process. I would
prefer not to bundle Lua 5.3 code with Wireshark, but we could provide
instructions on retrieving and building it.
For the Ubuntu PPA, one option is to provide a lua5.3 package.

Note that João has done work before on trying to integrate Lua 5.3, that
could be a good start to continue the process:
https://code.wireshark.org/review/17175

Thanks for the recap. We should also decide what to do with the broken 
lrexlib-gregex Lua binding (bug 12997).