Modding, Mission Design, and Coding > The Scripting Workshop

Transition to 5.3

(1/1)

chief1983:
Are we going to do this?  It seems like more and more distributions are only keeping 5.1 packages around for compatibility reasons, but I can't expect that to continue forever.  Is it time to start planning what we might be able to do to move forward with our Lua support?  What kind of questions are there to be asked and answered on this subject?  I can think of a few at least.


* Just how incompatible is 5.3 with 5.1?
* Does the engine code that hooks into Lua do anything that is incompatible with Lua 5.3 itself?
* What kind of effort would be needed to migrate existing scripts?  Are we talking major community wide effort to try to reach all the bases?
* Will there be any way for mods to maintain support for both older and newer builds with different Lua versions?
* Could we try to link both interpreters and allow a transitional period where we support both Lua 5.1 and Lua 5.3 scripts?
Just not sure how much longer we can keep our heads buried in the sand with this one, thought maybe we should have some dialogue on the subject.

m!m:

--- Quote from: chief1983 on March 13, 2017, 11:45:51 am ---
* Just how incompatible is 5.3 with 5.1?
--- End quote ---
There are some changes that may break existing scripts. Some special Lua functions don't exist anymore or have changed their meaning.


--- Quote from: chief1983 on March 13, 2017, 11:45:51 am ---
* Does the engine code that hooks into Lua do anything that is incompatible with Lua 5.3 itself?
--- End quote ---
The engine code is not the problem since we can always change that to be compatible again. There are some minor changes to the C API but nothing that can't be fixed by a few code changes.


--- Quote from: chief1983 on March 13, 2017, 11:45:51 am ---
* What kind of effort would be needed to migrate existing scripts?  Are we talking major community wide effort to try to reach all the bases?
--- End quote ---
Since the existing scripts are within released mods there is not much we can do to fix them. We could do community patches for those mods but if there are source incompatibilities then that general issue can't be fixed.


--- Quote from: chief1983 on March 13, 2017, 11:45:51 am ---
* Will there be any way for mods to maintain support for both older and newer builds with different Lua versions?
--- End quote ---
The Lua scripts can check the Lua version and check if some required function exists to maintain compatibility with newer or older Lua versions.


--- Quote from: chief1983 on March 13, 2017, 11:45:51 am ---
* Could we try to link both interpreters and allow a transitional period where we support both Lua 5.1 and Lua 5.3 scripts?
--- End quote ---
Unless we put the different Lua interpreters into DLLs and then manually load the API functions from the correct DLL it will not be possible to keep both versions in the same executable.

Also, if we move to 5.3 we lose the ability to switch to LuaJIT if we ever want to do that. I don't think is is a big issue since we can always compile Lua 5.1 as part or our build if the system does not have that library.

Axem:
What changes were there exactly that could break previous scripts? I couldn't find much in the way of that in the 5.3 and 5.2 readme change lists.

m!m:
The pages you linked to also contain a section about incompatibilities with previous versions:
5.1 -> 5.2: https://www.lua.org/manual/5.2/manual.html#8
5.2 -> 5.3: https://www.lua.org/manual/5.3/manual.html#8

Axem:
Haha... Wow I can't read. :nono:

Navigation

[0] Message Index

Go to full version