Skip to content

lua 5.5 - for loop variables are now const - #42

Open
spotaws wants to merge 1 commit into
ToxicFrog:masterfrom
spotaws:patch-1
Open

spotaws wants to merge 1 commit into
ToxicFrog:masterfrom
spotaws:patch-1

Conversation

@spotaws

@spotaws spotaws commented Mar 5, 2026

Copy link
Copy Markdown

In Lua 5.5 (latest stable lua), for loop variables are now const. This fixes the code in ast/IO.lua to define a local variable within the loop that can be modified. I believe this is the only change necessary to support Lua 5.5, and it is backwards compatible.

In Lua 5.5 (latest stable lua), for loop variables are now const. This fixes the code in ast/IO.lua to define a local variable within the loop that can be modified. I believe this is the only change necessary to support Lua 5.5, and it is backwards compatible.
@alerque

alerque commented Sep 12, 2026

Copy link
Copy Markdown

This should be applied and released, and somewhat urgently. This is blocking lots of downstream stuff. I'm going to look into backporting a patch for the Arch Linux lua-vstruct package, but that will only monkey patch it for one distro, people installing from Luarocks will still have issues.

@alerque

alerque commented Sep 12, 2026

Copy link
Copy Markdown

@mcepl I see you released lua55-vstruct for OpenSUSE a while back, but I couldn't find the packaging source. Did you just force it to build on Lua 5.5 like I blindly did initially for Arch or did you actually patch this problem so it runs right (like I backported in #43)?

@mcepl

mcepl commented Sep 12, 2026

Copy link
Copy Markdown

@mcepl I see you released lua55-vstruct for OpenSUSE a while back, but I couldn't find the packaging source. Did you just force it to build on Lua 5.5 like I blindly did initially for Arch or did you actually patch this problem so it runs right (like I backported in #43)?

Packaging source is https://src.opensuse.org/lua/lua-vstruct (devel:languages:lua was one of the first devel projects in openSUSE which transferred to Git).

And concerning to this particular problem, the answer is simple, I just didn’t run tests ;). Embarrassing.

@alerque

alerque commented Sep 13, 2026

Copy link
Copy Markdown

@ToxicFrog Has this issue hit your radar yet? I don't mean to be obnoxious –as a FOSS maintainer myself I know how things fall through the cracks in especially if the pings come at the wrong moment– but this needs attention.

Alternatively @deepakjois are you tracking this? I see you're the owner of the module on LuaRocks. I wonder if you could apply the backport patch (found in #43) by posting a rockrel bump that points that commit instead of the main repo to fetch the sources.

Somehow –whether as a patch release just fixing the Lua 5.5 compatibility or as a minor version release with the other unreleased changes– this needs to get out there so other projects can keep using vstruct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants