Author Topic: Transition to 5.3  (Read 1710 times)

0 Members and 1 Guest are viewing this topic.

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
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.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline m!m

  • 211
  • Just how incompatible is 5.3 with 5.1?
There are some changes that may break existing scripts. Some special Lua functions don't exist anymore or have changed their meaning.

  • Does the engine code that hooks into Lua do anything that is incompatible with Lua 5.3 itself?
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.

  • 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?
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.

  • Will there be any way for mods to maintain support for both older and newer builds with different Lua versions?
The Lua scripts can check the Lua version and check if some required function exists to maintain compatibility with newer or older 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?
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.

 

Offline Axem

  • 211
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.

 

Offline m!m

  • 211
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