wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.74k stars 262 forks source link

Error while updating plugins #589

Open Trid-collab opened 2 years ago

Trid-collab commented 2 years ago

After the latest update of the packer,nvim I am getting the following error.

image

neovim --version

NVIM v0.6.0-dev+218-g3f526feeb Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include Compiled by runner@fv-az65-302

Features: +acl +iconv +tui See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: " /home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Run :checkhealth for more info

quantum-booty commented 2 years ago

Update: Latest neovim/packer has fixed this error.

I'm getting another error instead on :PackerSync: image OS: Arcolinux Nvim --version:

NVIM v0.6.0-dev+218-g3f526feeb
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az65-302

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Packer config: default Packer compiled file: https://pastebin.com/bnnsRayn

jamestrew commented 2 years ago

I'm also getting an error, specifically on :PackerSync Error executing vim.schedule lua callback: ...ite/pack/packer/start/packer.nvim/lua/packer/display.lua:214: Index out of bounds

Strangely, does not happen on PackerUpdate or PackerCompile

OS: Arch linux nvim --version

NVIM v0.5.0
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim/src/neovim-0.5.0/build/config -I/build/neovim/src/neovim-0.5.0/src -I/usr/include -I/build/neovim/src/neovim-0.5.0/build/src/nvim/auto -I/build/neovim/src/neovim-0.5.0/build/include
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Packer config:

  config = {
    display = {
      open_fn = function()
        return require("packer.util").float({ border = "single" })
      end,
    },
  },

packer_compiled.lua

AlexMasterov commented 2 years ago
nvim v0.0.6-dev+214-gdce50312e

I get similar error messages on :PackerSync:

image

akinsho commented 2 years ago

Hi, can someone please add the information from the issue template to this thread so we are better able to help resolve this issue i.e. what operating system are you on, what does the packer config file look like, what does your packer compiled file look like etc. (please don't link to your config since that means we'd have to read through it all, we just need the packer related file/block).

quantum-booty commented 2 years ago

@akinsho Hi thank you, I added additional information.

akinsho commented 2 years ago

Hi @quantum-booty thanks, can you include the full output of nvim --version it seems to be complaining about extmarks and the API hasn't changed so it might be a question of the commit of nightly you are on

quantum-booty commented 2 years ago

@akinsho updated.

Trid-collab commented 2 years ago

@akinsho updated

bangedorrunt commented 2 years ago

In my case, it happened when I tried to change a lazy-loaded plugin condition to different types of events and/or from optional to start and then ran the update/sync.

vladdoster commented 2 years ago

Ths seems to be a duplicate of #583

vladdoster commented 2 years ago

This issue stems from neovim v0.6.0.

If you downgrade to v0.5.0 the issue will go away.

See this this issue.

ashincoder commented 2 years ago

I do have this issue too. It is complaining about display.lua or smthng. I have mentioned it before. It has not been resolved. error: Error executing vim.schedule lua callback: .../site/pack/packer/opt/packe r.nvim/lua/packer/display.lua:214: Index out of bounds

neovim version : NVIM v0.5.0 Build type: Release LuaJIT 2.0.5

ashincoder commented 2 years ago

I am sorry, but I have brought this up here just to let u know guys it has not been resolved

jamestrew commented 2 years ago

I do have this issue too. It is complaining about display.lua or smthng. I have mentioned it before. It has not been resolved. error: Error executing vim.schedule lua callback: .../site/pack/packer/opt/packe r.nvim/lua/packer/display.lua:214: Index out of bounds

neovim version : NVIM v0.5.0 Build type: Release LuaJIT 2.0.5

I had this issue on 0.5 as well but I was able to "fix it". For me the issue was related to this janky setup function for lspinstall since without it, having after=nvim-lspinstall for lspconfig was causing issues with lsp starting. I ended up just taking out the setup for lspinstall and after for lspconfig.

    use({
      "kabouzeid/nvim-lspinstall",
      setup = function()
        vim.defer_fn(function()
          vim.cmd("silent! e %")
        end, 0)
      end,
    })
    use({
      "neovim/nvim-lspconfig",
      after = "nvim-lspinstall",
      config = function()
...
wbthomason commented 2 years ago

@trewjames From #583, it appears that there's some interaction between defer_fn and packer's async operations that can cause this issue.

Otherwise, it appears that something may have changed with v0.6.0 , though I didn't notice anything on https://github.com/neovim/neovim/issues/14090 and am using v0.6.0 myself without issue.

I think there are a few separate issues in this thread:

ashincoder commented 2 years ago

yes I am still using defer-fn in NvChad.

quantum-booty commented 2 years ago

@wbthomason The latest nvim or packer commit seems to have fixed my errors.

Trid-collab commented 2 years ago

Still getting this error with the latest neovim nightly release and packer update with PackerSync Incidently noticed a similar error when I had downgraded my neovim to the stable 0.5 release

image

My packer setup in my init.vim

-- Auto install packer.nvim if not exists local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path) end vim.cmd [[packadd packer.nvim]] vim.cmd 'autocmd BufWritePost plugins.lua PackerCompile' -- Auto compile when there are changes in plugins.lua

have this in my plugins.lua file as well use({ "wbthomason/packer.nvim", opt = true })

wbthomason commented 2 years ago

@Trid-collab: please open a new issue and include your plugin specification. It looks like you've probably discovered an edge case where we don't initialize the result object for an operation correctly.