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: updating with lazy.nvim does not work #237

Closed
laytan opened this issue Apr 4, 2023 · 4 comments
Closed

bug: updating with lazy.nvim does not work #237

laytan opened this issue Apr 4, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@laytan
Copy link

laytan commented Apr 4, 2023

Neovim version (nvim -v)

v0.9.0-dev-1326+g7c8c15507

Operating system/version

MacOS 13.0.1

Output of :AerialInfo

Aerial Info

Filetype:
Configured backends:
treesitter (not supported) [No treesitter parser for ]
lsp (not supported) [No LSP client found]
markdown (not supported) [Filetype is not markdown]
man (not supported) [Filetype is not man]
Show symbols: Class, Constructor, Enum, Function, Interface, Module, Method, Struct

Describe the bug

Lazy prompts to update, when updating, it fails because of changes to doc/tags.
Double checked that there are no local changes.

Screenshot 2023-04-04 at 10 44 26
Screenshot 2023-04-04 at 10 43 34

Steps To Reproduce

  1. nvim -u repro.lua
  2. :Lazy
  3. U

Expected Behavior

Update successfully

Minimal example file

n/a

Minimal init.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",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    "stevearc/aerial.nvim",
    config = function()
      require("aerial").setup({
        -- add your aerial config here
      })
    end,
  },
  {
    "nvim-treesitter/nvim-treesitter",
    build = ":TSUpdate",
    config = function()
      require("nvim-treesitter.configs").setup({
        ensure_installed = { "c", "lua" },
        auto_install = true,
        highlight = { enable = true },
      })
    end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

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

Additional context

No response

@laytan laytan added the bug Something isn't working label Apr 4, 2023
@kiyoon
Copy link

kiyoon commented Apr 4, 2023

I have the same issue.

@stevearc
Copy link
Owner

stevearc commented Apr 4, 2023

Not sure how this could have happened, as I use a CI script to keep the tags file in sync with the help docs. Regardless, I've decided to put doc/tags in gitignore and stop checking it in. All the modern package managers (lazy, packer, paq) will autogenerate helptags for you, and if you're managing packages yourself you hopefully know enough to call :helptags ALL.

That said, that will prevent this sort of issue moving forward, but your current install will still refuse to update. You need to go to the repo (by default installed in ~/.local/share/nvim/lazy/aerial.nvim) and clear the changes (a git checkout . will work). It's probably best to also pull latest yourself (git pull) so that lazy won't regenerate the changes in that file when you next open vim. After that, updating via lazy should work.

If you think that the repo doesn't have any changes, then you are looking in the wrong place. If you can't find the repo, you can always mark aerial as disabled in lazy, then clean (which removes the repo and deletes the lockfile entry), then re-enable it.

@stevearc stevearc closed this as completed Apr 4, 2023
@laytan
Copy link
Author

laytan commented Apr 5, 2023

Thanks, works great again!

@olimorris
Copy link

Came to this late but thanks for fixing.

@stevearc - might be worth pinning this solution to the issues tab as a lot of users may experience this and be unable to update without your workaround above

@stevearc stevearc pinned this issue Apr 10, 2023
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

4 participants