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
I just started a new plugin and decided to give busted another shot after previously having found it not usable for plugin development (a separate story -- let's see if this time goes any better...)
I see the .busted file here contains a hardcoded path to nlua, which struck me as quite strange, as that path is not guaranteed to be where luarocks is installing things to, given it's user-configurable (and indeed in my own case, I do not have luarocks installing things to ~/.luarocks). I see simply putting "nlua" there and letting the PATH be searched as "usual" though works. That seems to me strictly better.
Secondly, despite the README saying that eval $(luarocks path --no-bin) is the fix for the busted.runner error message, that wasn't enough in my case, and all it did was give me a different error message, one saying that pl.path requires LuaFileSystem -- neither of these errors seem to have many search results for them.
But what did then work for me was changing to luarocks path --no-bin --lua-version 5.1 in both the shell sourcing as well as the luarocks test invocation. I assume whether this works as documented or doesn't for someone probably depends on what lua version their luarocks is installed to?
The final product that seems to work here (so far) is this commit
So TL;DR, I propose tweaking the .busted to match what I ended up with. Is there any drawback I'm missing for that?
(I'm happy to send a PR for either or both of the above if there's agreement.)
The text was updated successfully, but these errors were encountered:
(The saga continues a bit, as I see in CI using the 2 Lua GitHub actions, that even what I had there is not enough https://github.com/Julian/runt.nvim/actions/runs/10726393103/job/29746328008 and that presumably I need a bit more to tell luarocks in GH Actions where Lua lives. So that'll be what I try to figure out later, as I've probably fought enough for the morning :) -- maybe I want to follow the section of the nlua readme saying how to configure luarocks to install directly to nlua...)
I just started a new plugin and decided to give
busted
another shot after previously having found it not usable for plugin development (a separate story -- let's see if this time goes any better...)I see the
.busted
file here contains a hardcoded path tonlua
, which struck me as quite strange, as that path is not guaranteed to be whereluarocks
is installing things to, given it's user-configurable (and indeed in my own case, I do not have luarocks installing things to~/.luarocks
). I see simply putting"nlua"
there and letting thePATH
be searched as "usual" though works. That seems to me strictly better.Secondly, despite the README saying that
eval $(luarocks path --no-bin)
is the fix for thebusted.runner
error message, that wasn't enough in my case, and all it did was give me a different error message, one saying thatpl.path requires LuaFileSystem
-- neither of these errors seem to have many search results for them.But what did then work for me was changing to
luarocks path --no-bin --lua-version 5.1
in both the shell sourcing as well as theluarocks test
invocation. I assume whether this works as documented or doesn't for someone probably depends on what lua version theirluarocks
is installed to?The final product that seems to work here (so far) is this commit
So TL;DR, I propose tweaking the
.busted
to match what I ended up with. Is there any drawback I'm missing for that?(I'm happy to send a PR for either or both of the above if there's agreement.)
The text was updated successfully, but these errors were encountered: