Tiny Core Extensions > TCE Corepure64

[Solved] lua 5.4.6 for TCL14 x86_64

<< < (5/8) > >>

GNUser:
Hi Rich. Yes it would. However, I think we should deprecate extensions called lua.tcz and lua-dev.tcz. Therefore, no packages should depend on lua.tcz or lua-dev.tcz.

The version number (for Lua x.y.z, version number is x.y and z is the bug fix release) should always be part of the extension name.

P.S. lua-x.y-dev.tcz would have a startup script that creates a link called lua.pc pointing to lua-x.y.pc. The lua-5.4-dev.tcz extension that I submitted today has a startup script that does just that.

GNUser:
Hi Rich. Sorry, I just realized that what I said above was an unsatisfactory, partial response to your very legitimate concerns. I will try to give a (hopefully) complete response below, in four bullet points. If you catch a missing detail, please let me know.

* lua-dev.tcz should be renamed lua-5.3-dev.tcz
* in lua-5.3-dev.tcz: lua.pc file should be renamed lua-5.3.pc
* in lua-5.3-dev.tcz: the extension should have a startup file that looks like this:

--- Code: ---#!/bin/sh

LUAPC_LATEST=$(ls /usr/local/lib/pkgconfig/lua* | grep -Eo '/usr/local/lib/pkgconfig/lua-[0-9]+\.[0-9]+\.pc' | sort -V | tail -n1)
ln -sf $(readlink $LUAPC_LATEST) /usr/local/lib/pkgconfig/lua.pc
--- End code ---
* .dep files that contain lua-dev.tcz should be updated to contain lua-5.3-dev.tcz

These proposals are based on jazzbiker's ideas and I agree that they are the best (only?) way to support multiple versions of Lua on the machine. jazzbiker's smart idea is to include startup scripts in every lua-x.y.tcz, lua-x.y-lib.tcz, and lua-x.y-dev.tcz extension. The startup script's job is to ensure that those few files that don't normally have the Lua version in their name (namely: lua.pc, lua, luac, liblua.so) are just symlinks pointing the the most recent version of the relevant file that's available on the machine.

P.S. The Lua 5.4 submissions for the TCL14 x86_64 repo, which I sent today, incorporate jazzbiker's naming suggestions and include the startup scripts.

Rich:
Hi GNUser
The following is not limited to lua but extensions in general.

What I've seen being done in many (but not all) instances is:
When Y changes in version X.Y of extension.tcz, it gets replaced with a new extension.tcz.
When Y changes, backward compatibility is supposed to be maintained.

When X changes in version X.Y and backward compatibility is needed:
The old extension.tcz becomes extensionX.tcz where X is the old version number.
Sometimes the lib.so->lib.so.X link gets removed from the old extension.tcz.
The old extension-dev.tcz gets removed so nothing gets compiled against the old version.
Extensions that depend on the old extension.tcz need their .dep files updated to extensionX.tcz.
The new version becomes extension.tcz.

My concern is what issues get introduced if version numbers get added to extension names.
Checking all of the build/run dependencies to see if their extension names
need to be changed in build scripts.
The same might hold true for configure scripts and make files.
I'm sure .dep files get carried over in many cases when extensions get
updated, but version numbers all over the place would complicate that.

I see Juanito and andyj maintain a lot of extensions. Maybe they could
provide some input.

jazzbiker:
Hi Rich and GNUser,

I want to remind one more scheme which was not yet mentioned.

lua-5.3.tcz includes lua-5.3, luac-5.3 and no tce.installed
lua-5.4.tcz includes lua-5.4, luac-5.4 and no tce.installed
lua.tcz has lua-5.4.tcz as the dependency and contains tce.installed linking lua -> lua-5.4 and luac -> luac-5.4.

GNUser:

--- Quote from: Rich on August 19, 2023, 12:06:44 AM ---Hi GNUser
The following is not limited to lua but extensions in general.

What I've seen being done in many (but not all) instances is:
When Y changes in version X.Y of extension.tcz, it gets replaced with a new extension.tcz.
When Y changes, backward compatibility is supposed to be maintained.

When X changes in version X.Y and backward compatibility is needed:
The old extension.tcz becomes extensionX.tcz where X is the old version number.

--- End quote ---
Hi Rich. Not in Lua, where x.y is the major version.
x.(y+1) in Lua is a very big, ABI-incompatible change. See https://www.lua.org/versions.html

I agree with everything you said, but in Lua you have to adjust your thinking by a decimal place.


Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version