Update version checks for lua 5.5#74
Conversation
|
hi @tobil4sk Today, during my tests with Then, I had a few findings. Findings
Toogle the GitHub workflowname: Test
on: push
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
luaVersion: ["5.1", "5.2", "5.3", "5.4", "5.5", "luajit"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
# We are going to install
# lua-compat-5.3 from source
# patched by https://github.com/lunarmodules/lua-compat-5.3/pull/74
# to test lua-compat-5.3 on Lua 5.5
- uses: actions/checkout@master
with:
repository: lunarmodules/lua-compat-5.3
- uses: ilammy/msvc-dev-cmd@v1
if: ${{ runner.os == 'Windows' && !startsWith(matrix.luaVersion, 'luajit') }}
- uses: luarocks/gh-actions-lua@master
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: luarocks/gh-actions-luarocks@master
- name: Download lua-compat-5.3 patch
run: curl -kLO "https://github.com/lunarmodules/lua-compat-5.3/pull/74.patch"
- name: Apply lua-compat-5.3 patch
run: git apply "74.patch"
- name: Lint development rockspec
run: luarocks lint "rockspecs/compat53-scm-1.rockspec"
- name: Install the patched lua-compat-5.3
run: luarocks make "rockspecs/compat53-scm-1.rockspec"Note Since your PR is dealing with Lua 5.5 support, could you fix this? I guess that placing something in the direction of the following excerpt #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 505
#if !defined(lua_assert)
#include <assert.h>
#define lua_assert(c) assert(c)
#endif
#endifon |
|
Hello! I've found how lua 5.5 defines lua_assert: I have preserved the I'm also wondering how this should be handled "properly". Maybe this is outside of the scope of this library, since it only lists 5.3 compatibility for 5.1 and 5.2? It's also worth noting, I don't think the lua_assert macro was ever considered public. As an aside, the fact that there is no compile time or link time error on ubuntu is worrying. On my local environment, I get: |
yes. I considered that as well. Later, reading the code on lua-compat-5.3/c-api/compat-5.3.h Lines 290 to 303 in 1f6b82a In a perspective of someone from outside the project without a deep understanding about it, these changes are solving the build issue for Lua 5.5 quite well. Thank you for taking the time to analyze my considerations and submit these changes! |
|
What is needed to merge this? Arch Linux is currently in the process of updating to Lua 5.5, and having this fix would progress the update. |
|
Maybe @hishamhm can review this. |
|
I'd rather we followed along with the evolution of lua itself in terms of organisation and API:
@Vekhir How? (I don't understand how this issue would block that) |
The lua-bit32 package uses this projects code. Since the
Sometimes, patches can be backported at the discretion of the maintainer - and in this case, it's rather small - but common practice is to wait at least until the patch is upstream and can be expected to be included in the next release. |
|
Hi, @Vekhir I don't have any Arch Linux installed on my computer at the moment, but I did a quick inspection on In short, my conclusion is: apply the following patch --- PKGBUILD-orig 2026-03-02 11:51:26.577927670 -0300
+++ PKGBUILD 2026-03-02 11:52:50.492518591 -0300
@@ -28,7 +28,7 @@
_package() {
cd "$_archive"
depends+=("${pkgname%-*}"
- "${pkgname%-*}-bit32")
+ $([[ "x$1" == "x5.1" ]] && echo "${pkgname%-*}-bit32"))
luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
make --deps-mode=none --no-manifest "$_archive-$_rockrel.rockspec"
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSEto |
|
@luau-project The maintainers have chosen to apply a minimal patch to make it build. @daurnimator The last remaining package is |
|
@Vekhir please rebase to the latest |
Tagging @tobil4sk as the OP |
This is required by liolib.c, lstrllib.c, and ltablib.c, but was removed from the lua 5.5 since it was never a public part of the api.
ca8c9e2 to
e7a3e28
Compare
|
I did the rebase, CI is now passing |
|
@hishamhm we should tag a release here |
No description provided.