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

README file suggestion #550

Closed
dfgordon opened this issue Sep 28, 2024 · 2 comments · Fixed by #551
Closed

README file suggestion #550

dfgordon opened this issue Sep 28, 2024 · 2 comments · Fixed by #551

Comments

@dfgordon
Copy link

Requesting clarification of this snip from the README:

"A lua 5.1 or luajit installation, including headers (for luarocks). Note that Lua must be executable using the lua command."

It starts out fine, one thing or the other, but then by then end the "other thing" seems to be required after all (the "or" got transformed into an "and"). The strange thing is it seems everything works if typing lua executes any Lua, such as Lua 5.4, and luajit is installed. This is not made clear, and if true, is a useful thing to know.

Regarding headers, I can't tell if this refers to Lua 5.1 headers needed for luarocks, luajit headers needed for luarocks, or luarocks headers needed for something else. I didn't do anything special about headers and things worked, perhaps they already were installed. In any case can we clarify what these headers are about?

@mrcjkb
Copy link
Member

mrcjkb commented Sep 28, 2024

Hey 👋

but then by then end the "other thing" seems to be required after all (the "or" got transformed into an "and").

I suppose you're referring to the fact that Lua must be executable using the lua command?
What that means is that luarocks expects to find a lua executable on the path.
On some systems (e.g. when using homebrew on macos), if you have luajit installed, you can only run it with the luajit command, not with the lua command.

This will be solved (and the note can then be removed) when #386 has been implemented.

Regarding headers, I can't tell if this refers to Lua 5.1 headers needed for luarocks, luajit headers needed for luarocks, or luarocks headers needed for something else.

Yep, I can see how the wording is confusing there. I'll update that.
To clarify: Some luarocks packages are written in C and built against the Lua headers. Not all distractions ship Lua with headers included.

We have shifted out focus to writing our own luarocks package manager (#539), which is capable of installing lua (+ headers) as needed.
So this requirement will be obsolete soon.

@dfgordon
Copy link
Author

OK good to know. The below is what I have and it works fine for whatever reason. It sounds like this will be a moot point later on. Thanks for rocks.nvim!

(base) ➜ ~ which lua
/opt/homebrew/bin/lua
(base) ➜ ~ which luajit
/opt/homebrew/bin/luajit
(base) ➜ ~ lua -v
Lua 5.4.7 Copyright (C) 1994-2024 Lua.org, PUC-Rio
(base) ➜ ~ luajit -v
LuaJIT 2.1.1725453128 -- Copyright (C) 2005-2023 Mike Pall. https://luajit.org/
(base) ➜ ~

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

Successfully merging a pull request may close this issue.

2 participants