Wireshark-dev: Re: [Wireshark-dev] Move to Lua 5.3/5.4?

From: "Maynard, Christopher" <Christopher.Maynard@xxxxxxx>
Date: Tue, 24 May 2022 17:54:10 +0000
> -----Original Message-----
> From: Wireshark-dev <wireshark-dev-bounces@xxxxxxxxxxxxx> On Behalf
> Of João Valverde
> Sent: Monday, May 23, 2022 2:37 PM
> To: wireshark-dev@xxxxxxxxxxxxx
> Subject: Re: [Wireshark-dev] Move to Lua 5.3/5.4?
>
> On 23/05/22 18:03, Gerald Combs wrote:
> > On 5/23/22 6:57 AM, João Valverde wrote:
> >>
> >>
> >> On 23/05/22 14:01, João Valverde wrote:
> >>> With Wireshark 4.0 there is an opportunity to make more sweeping
> >>> changes. One of those is moving to Lua 5.3 or 5.4 (and only one of
> >>> those).
> >>>
> >>> Lua 5.3 has some important enhancements (bit ops, 64 bit integers
> >>> and a basic utf-8 library).
> >>>
> >>> Lua 5.4 introduces a new garbage collector.
> >>>
> >>> New Lua minor versions are not 100% backward-compatible so some
> >>> amount of breakage for existing Lua code is to be expected when
> >>> moving from Wireshark 3.6 to 4.0, if this move goes ahead.
> >>>
> >>
> >> Note: Code using lua_bitop will have to be converted to native Lua
> >> bitwise operators. There is no compatibility provided for that.
> >
> > Is forward and backward compatibility a matter of checking Lua's
> > _VERSION global, e.g.
> >
> >     if (_VERSION == "Lua 5.1") then
> >         ...
> >     else
> >         ...
> >     end
> >
> > ? If so, it would probably be useful to provide an example somewhere.
>
> I'm not sure how far that simple strategy will go (not very?). Maybe
> someone else with more experience using multiple Lua versions can
> answer that.

I vaguely recall trying something like that for a different purpose, but without success.  Regardless, even if scripts can't be modified to work with different versions of Lua, I'm still very much in favor of moving to at least 5.3 for the Wireshark 4.0 release, just as I was 5 years ago prior to Wireshark 3.0 being released, backward compatibility be damned.  With 3.6 currently scheduled for long-term support until May 22, 2024 (https://gitlab.com/wireshark/wireshark/-/wikis/Development/LifeCycle), people will have plenty of time to migrate their scripts.  For me personally, I can't wait to migrate mine to use native Lua bit operators.

- Chris
P.S. I'm also in favor of removing deprecated arguments like text2pcap's "-n" option in the 4.0 release.  We've removed/changed arguments in the past without such concerns and a major release is the perfect time for this, in my opinion.  (Ref: https://gitlab.com/wireshark/wireshark/-/merge_requests/6923)










CONFIDENTIALITY NOTICE: This message is the property of International Game Technology PLC and/or its subsidiaries and may contain proprietary, confidential or trade secret information. This message is intended solely for the use of the addressee. If you are not the intended recipient and have received this message in error, please delete this message from your system. Any unauthorized reading, distribution, copying, or other use of this message or its attachments is strictly prohibited.