lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Feb 8, 2018, at 07:05, Vadim Peretokin wrote:
We've been using Lua 5.1 as a tool to give our users scripting functionality for nearly 10 years now. It's working well, but as our motto is not to break backwards compatibility, it seems at this point we are eternally stuck with 5.1 as I'm not seeing much by the way of migration tools being available. There are just custom patches to future Lua versions that add backwards compatibility, but building a non-standard Lua version is another whole world of pain.
Is anyone in a similar position? How are you looking at migrating to newer Lua versions?

A solution would be to embed both. If the script can work with Lua 5.3, use 5.3, otherwise fall back to 5.1.

If possible, measure how often that fallback happens. If users migrate and it almost never happens, you can think about retiring 5.1 entirely.

If you embed Lua in C, I suppose you will get symbol conflicts, so you will have to modify the source of one of the versions to prefix exported symbols.