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: plugins from dev directory appears in "Updates" section if there are not-yet-pushed commits #1380

Closed
3 tasks done
msva opened this issue Mar 24, 2024 · 2 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@msva
Copy link

msva commented Mar 24, 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)

v0.10.0-dev-2449+g185752614-dirty

Operating system/version

Gentoo Linux

Describe the bug

When using plugins from dev dir, and there commits that aren't pushed to remote, those plugins appears in "Updates" section as "updates available".
First of all, I thought, lazy shouldn't check remotes on dev plugins at all (isn't it the purpose of dev plugins at all?),
Second of all, lazy ignores any keys on that record: i (install), u (update), x (clean). Is it just as planned?
Why do it appear then?

Steps To Reproduce

  1. have not-yet-pushed commits in plugin residing in dev directory
  2. open :Lazy
  3. either have "checker = true" in settings, or, if disabled, perform any action on any plugin in the list (tested with install and clean)
  4. plugin from dev directory appears in the "Updates" list

Expected Behavior

dev-plugins never appear in "Updates" section 🤷

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",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@msva msva added the bug Something isn't working label Mar 24, 2024
@folke
Copy link
Owner

folke commented Mar 24, 2024

This works as intended.
Lazy does not manage dev plugins, so you can't perform any operations on them.

The show up as updated when the git status of the directory is not the same as the remote

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2024
@kevintraver
Copy link
Contributor

Related: #740

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

No branches or pull requests

3 participants