Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Too many rounds of missing plugins #1563

Closed
3 tasks done
hsanson opened this issue Jun 26, 2024 · 7 comments · Fixed by #1565
Closed
3 tasks done

bug: Too many rounds of missing plugins #1563

hsanson opened this issue Jun 26, 2024 · 7 comments · Fixed by #1565
Labels
bug Something isn't working

Comments

@hsanson
Copy link

hsanson commented Jun 26, 2024

Did you check docs and existing issues?

  • I have read all the lazy.nvim docs
  • I have searched the existing issues of lazy.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.11.0-dev-196+g2ce4a4d91

Operating system/version

Debian GNU/Linux 12 (bookworm)

Describe the bug

After latest Lazy vim update I get this error everytime I open vim:

Too many rounds of missing plugins

Steps To Reproduce

After removing all my plugins and adding them back one by one the issue seems to be with the rest-nvim/rest.nvim plugin that I load from a local directory. Note that loading it directly from github does not show the problem. The problem appears when I load the plugin from a local directory like below:

dir = "/home/Projects/vim/rest.nvim",
branch = "main",
dev = true,

Expected Behavior

No error is shown.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    -- "rest-nvim/rest.nvim",
    dir = "/home/Projects/vim/rest.nvim",
    branch = "main",
    dev = true,
    lazy = true,
    ft = "http",
    dependencies = { "luarocks.nvim" },
    config = function()

    -- require("telescope").load_extension('rest')

      require("rest-nvim").setup({})
    end
  }
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@hsanson hsanson added the bug Something isn't working label Jun 26, 2024
@jtheo

This comment was marked as off-topic.

@folke

This comment was marked as off-topic.

@jtheo

This comment was marked as off-topic.

@folke
Copy link
Owner

folke commented Jun 26, 2024

Make sure your lazy.nvim version is up to date.

Lazy now supports luarocks, so please remove that luarocks.nvim dependency.
If the problem persists, run :checkhealth lazy and report back any errors you see, both in health and when loading Neovim.

  • You're also mixing dev=true and setting a dir. You should only specify one of the two.
  • lazy=true is not needed since you have ft=...
  • instead of that config function just add opts = {}

@hsanson
Copy link
Author

hsanson commented Jun 27, 2024

Running :checkhealth lazy:

lazy: require("lazy.health").check()

lazy.nvim
- OK {git} version 2.39.2
- OK no existing packages found by other package managers
- OK packer_compiled.lua not found

luarocks
- checking hererocks installation
- you have some plugins that require luarocks:
    * rest.nvim
    * hererocks
- OK {python3} Python 3.11.2
- OK {/home/ryujin/.config/nvim/.repro/data/nvim/lazy-rocks/hererocks/bin/luarocks} 3.11.1
- OK {/home/ryujin/.config/nvim/.repro/data/nvim/lazy-rocks/hererocks/bin/lua} Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio

I removed dev=true , lazy=true, replaced the config function with opts = {}, and removed the luarocks dependency:

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    -- "rest-nvim/rest.nvim",
    dir = "/home/ryujin/Projects/vim/rest.nvim",
    branch = "main",
    ft = "http",
    opts = {}
  }
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Still running nvim -u repro.lua I get the output below. Note I am not using any other configurations or plugins, only the repro.lua configuration above:

image

This is my neovim:

NVIM v0.11.0-dev-275+gb0c336eaf8
Build type: RelWithDebInfo
LuaJIT 2.1.1716656478
Run "nvim -V1 -v" for more info

Replacing dir=/path/to/rest.nvim with the git reference "rest-nvim/rest.nvim" fixes the issue. Is when I load the plugin from a local cloned repo that the issue appears.

@folke
Copy link
Owner

folke commented Jun 27, 2024

Can reproduce with:

repro.lua
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

local rest_repo = "https://github.com/rest-nvim/rest.nvim.git"
local rest_path = root .. "/tmp/rest.nvim"
vim.fn.mkdir(root .. "/tmp", "p")

if not vim.loop.fs_stat(rest_path) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", rest_repo, rest_path })
end

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    -- "rest-nvim/rest.nvim",
    dir = rest_path,
    branch = "main",
    ft = "http",
    opts = {},
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Will look into it!

@hsanson
Copy link
Author

hsanson commented Jun 27, 2024

Thanks, tested the this fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants