nvim-neorocks / rocks.nvim

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

Rocks installed but doesn't work #256

Closed Brayan-724 closed 1 month ago

Brayan-724 commented 1 month ago

Recently I install rocks.nvim but after following the both automatic and manual installation, it doesn't work. Notes:

Details: OS: Arcolinux (Arch linux) Neovim version:

NVIM v0.10.0-dev-2826+gf6dcc464f
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188
Compilation: /usr/bin/gcc-10 -O2 -g -Og -g -flto=auto -fno-fat-lto-objects -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wno-conversion -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always  -DUNIT_TESTING -DHAVE_UNIBILIUM -D_GNU_SOURCE -DINCLUDE_GENERATED_DECLARATIONS -I/home/runner/work/neovim/neovim/.deps/usr/include/luajit-2.1 -I/home/runner/work/neovim/neovim/.deps/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include -I/home/runner/work/neovim/neovim/build/cmake.config -I/home/runner/work/neovim/neovim/src -I/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Luarocks version:

/usr/bin/luarocks 3.11.0
LuaRocks main command-line interface
mrcjkb commented 1 month ago

Hey 👋

Based on the first error message, you have rocks.nvim version 2.20.0 installed (Strangely, the error says there's a syntax error on line 8, but that line is empty in version 2.20.0.

https://github.com/nvim-neorocks/rocks.nvim/blob/e865469e8a427e8f9378f930397a90b85a2d3e5e/plugin/rocks.lua#L8

So maybe somehow your installation got corrupted?

Does it work if you uninstall and install the latest version?

Brayan-724 commented 1 month ago

I edited the message, I forgot that I've modified the file to debug it, if I use the original one it crashes

Brayan-724 commented 1 month ago

I found the line where it crashes. https://github.com/nvim-neorocks/rocks.nvim/blob/e865469e8a427e8f9378f930397a90b85a2d3e5e/plugin/rocks.lua#L54

If I execute just that line manually then crash.

Searching deeper I found that is because the version 2.20.0 is using toml instead of toml-edit, but now it is no install. I think it would be fixed installing toml or upgrading to 2.21.0.

Brayan-724 commented 1 month ago

Fixed, upgrade to 2.21.0

mrcjkb commented 1 month ago

Ah yes, we had quite a few people on Arch-based distros and Windows having issues with the toml library. So we added the functionality we needed to toml-edit and got rid of the toml dependency :smile: