bluebird75/luaunit

support for Lua 5.4

gennaro-tedesco opened this issue · 4 comments

Description

luaunit fails to install for Lua 5.4

Configuration

$ lua -v
Lua 5.4.2  Copyright (C) 1994-2020 Lua.org, PUC-Rio

system: macOs Big Sur, version 11.1

Example

Running luarocks install luaunit throws the following:

Installing https://luarocks.org/luaunit-3.3-1.src.rock
Missing dependencies for luaunit 3.3-1:
   lua < 5.4 (not installed)

luaunit 3.3-1 depends on lua >= 5.1 (5.4-1 provided by VM)
luaunit 3.3-1 depends on lua < 5.4 (not installed)

Error: Could not satisfy dependency lua < 5.4: Rock lua 5.4-1 is already provided by VM or via 'rocks_provided' in the config file.

Is luaunit unsupported for the latest versions of Lua or am I installing it wrong?

Notice that you have lua 5.4 but luaunit requires < 5.4. The current git version appears to allow < 5.5 -- see 67da65d -- but this hasn't been released yet.

For now, you can install to 5.3 instead:

luarocks install luaunit --lua-version 5.3

In order to use it, you will need to change your lua paths to use Lua 5.3. This can be done by:

eval `luarocks path --lua-version 5.3`

That merely runs a couple of export commands to update the environment variables, so it should only last as long as your terminal instance does.

Version 3.4 of LuaUnit has now been released, with support for Lua 5.4 . You can install/upgrade it with luarocks.

Thanks for creating the incentive of doing it !

I confirm it installs fine

luarocks install luaunit
Installing https://luarocks.org/luaunit-3.4-1.rockspec

luaunit 3.4-1 depends on lua >= 5.1 (5.4-1 provided by VM)
luaunit 3.4-1 depends on lua < 5.5 (5.4-1 provided by VM)
luaunit 3.4-1 is now installed in /usr/local (license: BSD)

I have not checked yet by writing unit test code (but I suspect it should work fine too).

I would be surprised if it would not work fine but don't hesitate to report it if that's the case!