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

Unexpected packer compile error

Open ruanyouxing opened this issue 2 years ago • 12 comments

  • nvim --version: 0.7.2
  • git --version: 2.37.2
  • Operating system/version: Arch Linux
  • Terminal name/version:Kitty 0.25.2

Steps to reproduce

1.Run :PackerSync or anything that calls require('packer').compile() 2.All plugins cloned 3.Error triggered

Actual behaviour

[ERROR] nvim/site/pack/packer/opt/packer.nvim/lua/packer/async.lua:20: Error in coroutine: .../site/pack/packer/opt/packer.nvim/lua/packer/compile.lua:674: attempt to index a nil value

packer_compiled.lua couldn't create

Expected behaviour

It runs normally and there's no error triggered

packer files

Plugin specification file(s)

pack.lua

modules folder, based on Cosynvim template

packer log file

Post the contents of ~/.cache/nvim/packer.nvim.log here

$ cat ~/.cache/nvim/packer.nvim.log`

`[ERROR Thu Sep  8 12:37:19 2022 3443993188514] ...im/site/pack/packer/opt/packer.nvim/lua/packer/async.lua:20: Error in coroutine: .../site/pack/packer/opt/packer.nvim/lua/packer/compile.lua:674: attempt to index a nil value`
packer compiled file

It couldn't create, so there's no packer_compiled.lua

ruanyouxing avatar Sep 08 '22 13:09 ruanyouxing

Thanks for the report. Can you isolate a commit in packer or your config files, etc. after which the problem started? This will help us isolate the problem.

wbthomason avatar Sep 08 '22 20:09 wbthomason

Thanks for the report. Can you isolate a commit in packer or your config files, etc. after which the problem started? This will help us isolate the problem.

I'm not sure but I got the error from September 6th, maybe it's 50aeb90 or 6db20b4

ruanyouxing avatar Sep 08 '22 23:09 ruanyouxing

Did you make changes to your config around this time? The line in the error message has to do with resolving wants and after - those features haven't been touched in packer for a while, unless I've forgotten something.

wbthomason avatar Sep 09 '22 02:09 wbthomason

Nope, I didn't change it at all, it ran properly in the past, when I use after for some plugins

ruanyouxing avatar Sep 09 '22 02:09 ruanyouxing

Did you make changes to your config around this time? The line in the error message has to do with resolving wants and after - those features haven't been touched in packer for a while, unless I've forgotten something.

That's gotta be it, coz I use after a lot,l and that happened occasionally while running PackerSync

bangedorrunt avatar Sep 09 '22 03:09 bangedorrunt

Hmm. Might be a long-standing bug, then. If either of you can isolate a minimal reproducing example, that would be really helpful.

wbthomason avatar Sep 09 '22 03:09 wbthomason

That's gotta be it, coz I use after a lot,l and that happened occasionally while running PackerSync

@babygau oh i know the problem Did you use opt = true and after at the same time?

ruanyouxing avatar Sep 12 '22 13:09 ruanyouxing

@wbthomason I think i got the problem maybe I use after and opt = true at the same time and it triggered errors

ruanyouxing avatar Sep 13 '22 13:09 ruanyouxing

@ruanyouxing No, I don't use these 2 keys at a time. This happen sometimes when I update the plugins, and also when I change the plugin with same name but different fork version.

bangedorrunt avatar Sep 13 '22 13:09 bangedorrunt

@ruanyouxing No, I don't use these 2 keys at a time. This happen sometimes when I update the plugins, and also when I change the plugin with same name but different fork version.

@babygau what's your plugin can you show me?

ruanyouxing avatar Sep 13 '22 14:09 ruanyouxing

You can find references here

https://github.com/babygau/nix/blob/tdt/dotfiles/nvim/fnl/plugins/init.fnl

Note there are 2 plugins I'm using on local development, switching back and forth local and remote repository sometime give me this bug, but not frequently. This I consider a complication conflict.

bangedorrunt avatar Sep 13 '22 18:09 bangedorrunt

Hi there, has there been any progress on this? I am getting a similar error with neovim version 0.8 and the error:

[ERROR 18:41:51] async.lua:20: Error in coroutine: ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:757: invalid value (boolean) at index 17 in table for 'concat'

arminveres avatar Nov 16 '22 17:11 arminveres