plenary.nvim icon indicating copy to clipboard operation
plenary.nvim copied to clipboard

Plenary needs lua version 5.1 but disabled on homebrew

Open MRegeard opened this issue 1 year ago • 1 comments

I get the following error message when building plenary using Lazy: Capture d’écran 2024-07-02 à 21 49 42 But [email protected] is disabled in homebrew. So I cannot install lua version 5.1. What should I do about it ? I have luarocks installed, but it points to lua version 5.4 (version installed on my laptop). I don't know much about lua or plenary, but shouldn't it support newer version of lua ?

MRegeard avatar Jul 02 '24 20:07 MRegeard

I'm also facing the same issue. Do we know what needs to update, or this is some inner dependency?

shinspiegel avatar Jul 03 '24 16:07 shinspiegel

I fixed this by uninstalling lua via brew install lua 5.1 from source https://www.lua.org/ftp/

make macosx
sudo make install

jrgirvan avatar Jul 08 '24 04:07 jrgirvan

I think this has something to do with luarocks support in lazy.nvim. we have a rockspec file for quite sometime and lazy.nvim now tries to install plenary with that rockspec file (just a guess) but we actually havent changed anything in here so it has to be something different. You can try to disable rocks support for plenary in lazy.nvim with opts.rocks.enabled = false

Conni2461 avatar Jul 08 '24 04:07 Conni2461

I think this has something to do with luarocks support in lazy.nvim. we have a rockspec file for quite sometime and lazy.nvim now tries to install plenary with that rockspec file (just a guess) but we actually havent changed anything in here so it has to be something different. You can try to disable rocks support for plenary in lazy.nvim with opts.rocks.enabled = false

Sorry for the dumb question, How can I add these disabled options?

What I already tried (with Lazy) without success,

{
	"nvim-lua/plenary.nvim",
	name = "plenary",
	config = function ()
		-- I tried this
		require("plenary").setup({ .... })
		-- And this
		require("plenary").opt.rocks = false
	end
},

shinspiegel avatar Jul 08 '24 06:07 shinspiegel

sorry was on mobile earlier. lazy has rocks support, not plenary. so try

{
  "nvim-lua/plenary.nvim",
  name = "plenary",
  rocks = {
    enabled = false,
  },
},

Conni2461 avatar Jul 08 '24 09:07 Conni2461

no sorry, previous example was also wrong.

require("lazy").setup({
  rocks = {
    enabled = false,
  },
  {
    "nvim-lua/plenary.nvim",
    name = "plenary",
  }
}

this should have nothing to do with plenary. Also read this: https://github.com/folke/lazy.nvim/blob/1870238cf9c579c5d7eb8ea8b296f10b81978d34/doc/lazy.nvim.txt#L49

Conni2461 avatar Jul 08 '24 09:07 Conni2461

Thanks @Conni2461, disabling rocks fixed the issue for me.

MRegeard avatar Jul 09 '24 21:07 MRegeard

thanks for confirming. so its a breaking change in lazy.nvim that can cause problems with plugins that provide a rockspec file. Not related to this repo. closing

Conni2461 avatar Jul 10 '24 06:07 Conni2461