nvim-neorocks / rocks.nvim

🌒 Neovim plugin management inspired by Cargo, powered by luarocks
GNU General Public License v3.0
720 stars 15 forks source link

Additional installation requirements #502

Closed rktjmp closed 3 months ago

rktjmp commented 3 months ago

I was going to write a PR but wasn't sure of the language, and overstuffing the dependencies list.

When installing via the script, unzip must be a runnable command.

Configuring luarocks...
Configuring luarocks failed.
stderr:
stdout:
Configuring LuaRocks version dev...

Lua interpreter found: /usr/sbin/lua5.1
Checking if /usr/sbin/lua5.1 is Lua version 5.1... yes
lua.h found: /usr/include/lua5.1/lua.h
Could not find 'unzip'.
Make sure it is installed and available in your PATH.

configure failed.

This error is obscured when using the bootstrap installation method. You also need make.

When running nvim with rocks installed /usr/bin/env lua must succeed. For example, installing lua51 on Archlinux does not install a lua command, it's lua5.1 (the lua command is reserved for the 5.4 packaged called lua).

Error executing vim.schedule lua callback: /root/.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:100: Async task failed without callback: The coroutine failed with this message:
/root/.local/share/nvim/rocks/share/lua/5.1/nio/control.lua:145: /usr/bin/env: ‘lua’: No such file or directory

stack traceback:
        [C]: in function 'error'
        /root/.local/share/nvim/rocks/share/lua/5.1/nio/control.lua:145: in function 'wait'
        /root/.local/share/nvim/rocks/rocks_rtp/lua/rocks/state.lua:44: in function 'installed_rocks'
        .../.local/share/nvim/rocks/share/lua/5.1/rocks/adapter.lua:150: in function 'init_site_symlinks_async'
        .../.local/share/nvim/rocks/share/lua/5.1/rocks/adapter.lua:184: in function 'synchronise_site_symlinks'
        .../.local/share/nvim/rocks/share/lua/5.1/rocks/adapter.lua:176: in function 'ensure_site_links'
        .../.local/share/nvim/rocks/share/lua/5.1/rocks/adapter.lua:190: in function 'init'
        .../luarocks/rocks-5.1/rocks.nvim/2.36.1-1/plugin/rocks.lua:57: in function <.../luarocks/rocks-5.1/rocks.nvim/2.36.1-1/plugin/rocks.lua:56>
mrcjkb commented 3 months ago

Hey 👋

Thanks for reporting. I've opened a PR to update the requirements. Let me know if that looks good to you 😀

Regarding requiring lua: We can probably solve that by adding a shim (based on nlua) that uses Neovim's Lua interpreter.

rktjmp commented 3 months ago

Using a shim/nlua would be a good idea I think.