Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to switch LUA/LUAJIT from busted cli #330

Closed
v9n opened this issue Feb 6, 2015 · 4 comments
Closed

A way to switch LUA/LUAJIT from busted cli #330

v9n opened this issue Feb 6, 2015 · 4 comments

Comments

@v9n
Copy link

v9n commented Feb 6, 2015

Hey,

I'm new to LUAJIT and I found that busted cli have #!usr/bin/env lua so it will not use LUAJIT or a way to switch. Right now I'm doing the symbolic link lua->luajit but I feel it is wrong and not sure that's the right way to do it.

I think it will be nice if we can do something like this:

LUA=luajit busted spec.lua
@DorianGray
Copy link
Contributor

So.... this is complicated.

Certain modules that are installable from luarocks and that are compiled for lua 5.1/2 do not work in luajit. You get these fun core dump errors when you try to load them. Errors around memory allocations and tracking.

This is compounded by system level differences with shell/bash scripts that caused us to remove this feature in the first place.

...In other words, you need to set up a separate luarocks environment that uses luajit instead of lua to get this to work properly. This can be accomplished in an automated way by using https://github.com/torch/torch7 which has a modified version of luarocks.

@DorianGray
Copy link
Contributor

If you want more information, there is plenty in some of our other closed issues here.

@jcupitt
Copy link

jcupitt commented May 26, 2017

It looks like the torch luarocks repo has moved. I think it's now at:

https://github.com/torch/luajit-rocks

@kapouer
Copy link

kapouer commented May 20, 2024

luajit /usr/bin/buster spec/*.lua ?

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

No branches or pull requests

4 participants