Lua 5.5 #254

Closed
opened 2026-08-21 15:38:56 +00:00 by goroboro · 2 comments
Member

Update Fedora's Lua interpreter from 5.4 to 5.5.
See https://fedoraproject.org/wiki/Changes/Lua5.5

Update Fedora's Lua interpreter from 5.4 to 5.5. See https://fedoraproject.org/wiki/Changes/Lua5.5
Author
Member

Installed Lua and checked package version and info to confirm 5.5
lua -v
Lua 5.5.1 Copyright (C) 1994-2026 Lua.org, PUC-Rio

I also ran through an online Lua tutorial to test that Lua behaved as expected: https://tylerneylon.com/a/learn-lua/

I checked what depends on Lua and installed the 'fennel' package to check that it installed correctly. I ran fennel and ran (print ("Hello World!")).
This worked correctly.

Finally, in lua, I tried to test some of the changes that are listed between 5.4 and 5.5. Since I am not well versed in Lua, I got some LLM help and after several iterations, we came up with the following script:

`-- 1) For-loop variables are read-only (5.5) — compile-time error
local chunk = load([[
for i = 1, 3 do
i = 10
end
]])
assert(chunk == nil, "loop variable assignment should fail to compile")
print("for-loop variables read-only: OK")

-- 2) table.create (new in 5.5)
local t = table.create(10, 5)
assert(type(t) == "table", "table.create should return a table")
assert(next(t) == nil, "table.create should return empty table")
print("table.create: OK")

-- 3) utf8.offset returns also final position of character (5.5)
local pos, final = utf8.offset("héllo", 2)
assert(pos == 2, "offset should be 2, got " .. tostring(pos))
assert(final == 3, "final position should be 3, got " .. tostring(final))
print("utf8.offset final position: OK")

print("All 5.5 tests passed")`

This works okay in 5.5 but fails in 5.4, so I guess this is a success :)

As far as I can tell this feature change is functional.

Installed Lua and checked package version and info to confirm 5.5 lua -v Lua 5.5.1 Copyright (C) 1994-2026 Lua.org, PUC-Rio I also ran through an online Lua tutorial to test that Lua behaved as expected: https://tylerneylon.com/a/learn-lua/ I checked what depends on Lua and installed the 'fennel' package to check that it installed correctly. I ran fennel and ran (print ("Hello World!")). This worked correctly. Finally, in lua, I tried to test some of the changes that are listed between 5.4 and 5.5. Since I am not well versed in Lua, I got some LLM help and after several iterations, we came up with the following script: `-- 1) For-loop variables are read-only (5.5) — compile-time error local chunk = load([[ for i = 1, 3 do i = 10 end ]]) assert(chunk == nil, "loop variable assignment should fail to compile") print("for-loop variables read-only: OK") -- 2) table.create (new in 5.5) local t = table.create(10, 5) assert(type(t) == "table", "table.create should return a table") assert(next(t) == nil, "table.create should return empty table") print("table.create: OK") -- 3) utf8.offset returns also final position of character (5.5) local pos, final = utf8.offset("héllo", 2) assert(pos == 2, "offset should be 2, got " .. tostring(pos)) assert(final == 3, "final position should be 3, got " .. tostring(final)) print("utf8.offset final position: OK") print("All 5.5 tests passed")` This works okay in 5.5 but fails in 5.4, so I guess this is a success :) As far as I can tell this feature change is functional.
Member

Fedora 45 has been released.

Fedora 45 has been released.
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
server/tickets#254
No description provided.