You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Control/Extend.lua: table.unpack is Lua 5.2+ (undefined on 5.1), and arrayExtend is off-by-one #2
Surfaced when the dev shell was pinned to Lua 5.1 (the pslua target); the fork previously tested on Lua 5.3, which hid this.
src/Control/Extend.luaarrayExtend used f(table.unpack(xs, i+1)):
table.unpack does not exist in Lua 5.1 (it is unpack in 5.1, table.unpack from 5.2) → runtime nil-call on the 5.1 target.
It also spread the tail as varargs and was off-by-one, whereas extend :: (Array a -> b) -> Array a -> Array b takes a single Array argument.
Fix: build the suffix sub-array with an explicit loop (no unpack) and pass it as one Array. Also the FFI value needed the paren-wrapped (function ... end) shape the pslua linker accepts.
Fixed together with the Lua-5.1 pin in the tooling-alignment PR #1 (the fix is coupled: CI cannot go green under 5.1 without it).
Activity
Unisay commentedon Jun 15, 2026
Verified fixed at v6.0.1: Control/Extend.lua is a pure-Lua loop (no table.unpack) with correct suffix indexing. Pinned in the package set.