nvim-neorocks / rocks.nvim

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

fix install of gitsigns.nvim #422

Open teto opened 2 months ago

teto commented 2 months ago

I am trying to run :Rocks install gitsigns.nvim with rocks.nvim 2.31.3-1 via its nix package.

ERROR | 2024-06-27 17:25:37 | ...myNeovimPackages/start/rocks.nvim/lua/rocks/luarocks.lua:64 | luarocks CLI FAILED
ERROR | 2024-06-27 17:25:37 | ...myNeovimPackages/start/rocks.nvim/lua/rocks/luarocks.lua:65 | Cloning into 'gitsigns.nvim'...
Cloning into 'plenary.nvim'...
cp: cannot stat 'lua/gitsigns/diff_ffi.lua': No such file or directory

Error: Build error: Failed installing lua/gitsigns/diff_ffi.lua in /home/teto/.local/share/nvim/rocks/lib/luarocks/rocks-5.1/gitsigns.nvim/scm-1/lua/gitsigns/diff_ffi.lua: Failed copying lua/gitsigns/diff_ffi.lua to /home/teto/.local/share/nvim/rocks/lib/luarocks/rocks-5.1/gitsigns.nvim/scm-1/lua/gitsigns/diff_ffi.lua

I wondered if

Cloning into 'gitsigns.nvim'...
Cloning into 'plenary.nvim'...

was an output that came before luarocks CLI failed or if it was a follow up step after luarocks CLI FAILED.

I peeked at the code and turns out it's the former: on failure, the handler prints luarocks CLI FAILED then displays the failed output that was generated earlier. adding : would make this clearer aka: luarocks CLI FAILED: and I am not sure that's possible with our log module but maybe indent the error as well ? it could be helpful to reprint the command that failed ?

This I can do.

Now to further debug, I would like to set the log level to info but couldn't find how to do that in help.

teto commented 2 months ago

seems like I uploaded the rockspec and it got out of date https://luarocks.org/modules/teto/gitsigns.nvim/scm-1 . Will try to update it to NUR