> lean.nvim build failed error when opening NeoVim , using Lazy
When opening nvim, the lazy plugin manager opens (I think on install mode, because it is highlighted compared to the others - Update, Sync, ...) and I get this error message:
Home (H) Install (I) Update (U) Sync (S) Clean (X)
Check (C) Log (L) Restore (R) Profile (P) Debug (D)
Help (?)
Total: 7 plugins
Failed (1)
● lean.nvim 41.09ms start
Failed to spawn process luarocks {
args = { "--tree", "/home/michael/.local/share/nvim/lazy-rocks/lean.nvim", "
cwd = "/home/michael/.local/share/nvim/lazy/lean.nvim",
env = {
PATH = "/home/michael/.local/share/nvim/lazy-rocks/hererocks/bin:/home/mic
},
on_line = <function 1>,
timeout = 120000
}
Failed installing lean.nvim with `luarocks`.
------------------------------------------------------------------------------
Trying to build from source.
Failed to spawn process luarocks {
args = { "--tree", "/home/michael/.local/share/nvim/lazy-rocks/lean.nvim", "
cwd = "/home/michael/.local/share/nvim/lazy/lean.nvim",
env = {
PATH = "/home/michael/.local/share/nvim/lazy-rocks/hererocks/bin:/home/mic
},
on_line = <function 1>,
timeout = 120000
}
Loaded (5)
● kanagawa.nvim 5.87ms start
● lazy.nvim 169.21ms init.lua
● nvim-lspconfig 6.34ms lean.nvim
● plenary.nvim 0.37ms lean.nvim
● telescope.nvim 0.84ms telescope lean.nvim
Not Loaded (1)
○ hererocks
I can still use lean in nvim without any problem, but I just wanted to make sure that this is a known issue that will be fixed in the future and not a more serious problem, I should have to do something about.
Same here with NixOS:
Total: 15 plugins
Failed (1)
● lean.nvim 13.88ms BufReadPre *.lean
`/home/noelemahcz/.local/share/nvim/lazy-rocks/hererocks/bin/lua` version `5.1` not installed
This plugin requires `luarocks`. Try one of the following:
- fix your `luarocks` installation
- disable *hererocks* with `opts.rocks.hererocks = false`
- disable `luarocks` support completely with `opts.rocks.enabled = false`
Will try building anyway, but will likely fail...
--------------------------------------------------------------------------------
Failed to spawn process luarocks {
args = { "--tree", "/home/noelemahcz/.local/share/nvim/lazy-rocks/lean.nvim", "--server", "https://nvim-neorocks.github.io/rocks-binaries/", "--lua-version", "5.1", "install", "--force-fast", "--deps-mode", "one", "lean.nvim" },
cwd = "/home/noelemahcz/.local/share/nvim/lazy/lean.nvim",
env = {
PATH = "/home/noelemahcz/.local/share/nvim/lazy-rocks/hererocks/bin:/nix/store/jiidf8d6nh86j84yb4xb5dqsd4nridg4-file-5.45/bin:/nix/store/ddvkwrb70cx04g7a42rlg6ka1j819kv4-jq-1.8.1-bin/bin:/nix/store/f8h7c1rh93wl6hlxfvwa9ypskzl2d7d3-poppler-utils-25.05.0/bin:/nix/store/y6296iczzmf5bb7v82v9xd3fndpjis8l-7zz-25.00/bin:/nix/store/q7j5awbg80d38p9my5b5zgn0xadgvbmb-ffmpeg-7.1.1-bin/bin:/nix/store/dk31gqj4lfsmx7ynmkh0nfs6dgmig7im-fd-10.2.0/bin:/nix/store/8m8bfl2xl7vpr8qlibgb0cd3ybkkmn3j-ripgrep-14.1.1/bin:/nix/store/y1az1agnfb2w4ycaf2jndd7n0z59cj9a-fzf-0.64.0/bin:/nix/store/aaraiqqb2qhnczpfn64x4b41ys78lcci-zoxide-0.9.8/bin:/nix/store/q45pdyfmh2mb5525pkibylcfl8ygnf97-imagemagick-7.1.2-0/bin:/nix/store/xmsfkdhb0s08zc1gj3avipxl33prfw97-chafa-1.16.2-bin/bin:/nix/store/nz5nria877m9zcp0v81f9sk36f0sx05a-resvg-0.45.1/bin:/run/wrappers/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/home/noelemahcz/.nix-profile/bin:/nix/profile/bin:/home/noelemahcz/.local/state/nix/profile/bin:/etc/profiles/per-user/noelemahcz/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/noelemahcz/.zsh/plugins/zsh-abbr:/nix/store/ay4ygsxgnvxv4alwpqmkjsnd1yc5nphg-systemd-257.6/bin:/nix/store/949qw4342ffgiblqqj8cd9s9jhmiwj4r-gnugrep-3.12/bin:/nix/store/7px6f2b1qykhlniicfm0b81i3xm0jc2m-neovim-ruby-env/bin"
},
on_line = <function 1>,
timeout = 120000
}
Failed installing lean.nvim with `luarocks`.
--------------------------------------------------------------------------------
Trying to build from source.
Failed to spawn process luarocks {
args = { "--tree", "/home/noelemahcz/.local/share/nvim/lazy-rocks/lean.nvim", "--dev", "--lua-version", "5.1", "make", "--force-fast", "--deps-mode", "one" },
cwd = "/home/noelemahcz/.local/share/nvim/lazy/lean.nvim",
env = {
PATH = "/home/noelemahcz/.local/share/nvim/lazy-rocks/hererocks/bin:/nix/store/jiidf8d6nh86j84yb4xb5dqsd4nridg4-file-5.45/bin:/nix/store/ddvkwrb70cx04g7a42rlg6ka1j819kv4-jq-1.8.1-bin/bin:/nix/store/f8h7c1rh93wl6hlxfvwa9ypskzl2d7d3-poppler-utils-25.05.0/bin:/nix/store/y6296iczzmf5bb7v82v9xd3fndpjis8l-7zz-25.00/bin:/nix/store/q7j5awbg80d38p9my5b5zgn0xadgvbmb-ffmpeg-7.1.1-bin/bin:/nix/store/dk31gqj4lfsmx7ynmkh0nfs6dgmig7im-fd-10.2.0/bin:/nix/store/8m8bfl2xl7vpr8qlibgb0cd3ybkkmn3j-ripgrep-14.1.1/bin:/nix/store/y1az1agnfb2w4ycaf2jndd7n0z59cj9a-fzf-0.64.0/bin:/nix/store/aaraiqqb2qhnczpfn64x4b41ys78lcci-zoxide-0.9.8/bin:/nix/store/q45pdyfmh2mb5525pkibylcfl8ygnf97-imagemagick-7.1.2-0/bin:/nix/store/xmsfkdhb0s08zc1gj3avipxl33prfw97-chafa-1.16.2-bin/bin:/nix/store/nz5nria877m9zcp0v81f9sk36f0sx05a-resvg-0.45.1/bin:/run/wrappers/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/home/noelemahcz/.nix-profile/bin:/nix/profile/bin:/home/noelemahcz/.local/state/nix/profile/bin:/etc/profiles/per-user/noelemahcz/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/noelemahcz/.zsh/plugins/zsh-abbr:/nix/store/ay4ygsxgnvxv4alwpqmkjsnd1yc5nphg-systemd-257.6/bin:/nix/store/949qw4342ffgiblqqj8cd9s9jhmiwj4r-gnugrep-3.12/bin:/nix/store/7px6f2b1qykhlniicfm0b81i3xm0jc2m-neovim-ruby-env/bin"
},
on_line = <function 1>,
timeout = 120000
}
Copying https://github.com/Julian/dotfiles/commit/21e2f7b742d3bb335681d6cb4ee48f0b6d72b61c will make the error go away.
While I haven't figured out why this change was made (it changed in either https://github.com/folke/lazy.nvim/commit/147f5a3f55b5491bbc77a55ce846ef5eb575fa42 or https://github.com/folke/lazy.nvim/commit/a1380a8461ab115d69ac6a570a92611969e16c3a both of which seem to have to do with lazy.nvim's rockspec support) or what plugins should do to get lazy.nvim to behave yet, I do already see lean.nvim isn't the only plugin affected (in my case, nvim-dap-python gives the same repeated error now on startup).
Help is welcome either to figure out what should be done, or perhaps even to ask a question on the lazy.nvim issue tracker and see if folke is expecting a specific thing out of plugin authors -- lean.nvim has a rockspec and publishes to Luarocks effectively to support users using a plugin manager which installs from there, but I don't understand why the new behavior to flag a broken luarocks is better than just installing the plugin "normally" out of the git repo, but I could be missing something.
Thank you very much! Doing what you suggested makes the error message disappear. Should I close this issue, or leave open it since the underlying problem wasn't solved yet?
Great! I think we can leave it open to try to solve the underlying issue