FS#67556 - [lua-alt-getopt] Has not been updated for Lua 5.4

Attached to Project: Community Packages
Opened by FichteFoll (FichteFoll) - Tuesday, 11 August 2020, 16:49 GMT
Last edited by Daurnimator (daurnimator) - Monday, 17 August 2020, 13:29 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Daurnimator (daurnimator)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The package hasn't been updated for Lua 5.4.
I don't know if Lua 5.4 is supported upstream, since it seemingly hasn't been updated in 11 years. From my testing it doesn't even seem to work for Lua 5.3, as that produces the same error as my improvised package that simply installs into `/usr/share/lua/5.4`.

I believe it to be the reason for moonscript being broken on Lua 5.4, but I'm not entirely sure since I never dealt much with the Lua ecosystem.
See also https://aur.archlinux.org/packages/moonscript/#comment-760422.

Steps to reproduce:

```
$ pacman -F /usr/share/lua/5.3/alt_getopt.lua
usr/share/lua/5.3/alt_getopt.lua is owned by community/lua-alt-getopt 0.7.0-8
usr/share/lua/5.3/alt_getopt.lua is owned by community/lua53-alt-getopt 0.7.0-9

$ lua
Lua 5.4.0 Copyright (C) 1994-2020 Lua.org, PUC-Rio
> require alt_getopt
stdin:1: syntax error near 'alt_getopt'
> require 'alt_getopt'
/usr/share/lua/5.4/alt_getopt.lua:24: attempt to call a nil value (global 'module')
stack traceback:
/usr/share/lua/5.4/alt_getopt.lua:24: in main chunk
[C]: in function 'require'
stdin:1: in main chunk
[C]: in ?
>

$ lua5.3
Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio
> require 'alt_getopt'
/usr/share/lua/5.3/alt_getopt.lua:24: attempt to call a nil value (global 'module')
stack traceback:
/usr/share/lua/5.3/alt_getopt.lua:24: in main chunk
[C]: in function 'require'
stdin:1: in main chunk
[C]: in ?
>
```
This task depends upon

Closed by  Daurnimator (daurnimator)
Monday, 17 August 2020, 13:29 GMT
Reason for closing:  Fixed
Comment by FichteFoll (FichteFoll) - Tuesday, 11 August 2020, 18:04 GMT
I just noticed that there is a newer version on luarocks[1], which has an upstream GitHub repository[2] and the changelog mentions it's no longer using `module` and now supports Lua 5.3.

[1]: https://luarocks.org/modules/mpeterv/alt-getopt
[2]: https://github.com/cheusov/lua-alt-getopt

Loading...