leafo/moonscript

Lua 5.4 breaks moonc because module() does not exist

Ocawesome101 opened this issue · 5 comments

When trying to run moonc with Lua 5.4, I get the following error.

lua5.4: /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'
        /usr/lib/luarocks/rocks-5.3/moonscript/0.5.0-1/bin/moonc:3: in main chunk
        [C]: in ?

I'm not sure why moonc works on Lua 5.3, because module seems to be nil there too.

Its already fixed but its not in 0.5.0-1 which is the latest stable release.
I installed the dev version with luarocks install moonscript --dev

timm commented

any fix on this?

no module() also breaks luarocks for me (lua 5.4), only way to fix this for me is use 5.1, any fix ideas?

leafo commented

You have to install MoonScript from the master branch. It's compatible with all released versions of lua 5.1 and above.