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.87k stars 267 forks source link

Unexpected packer compile error #1058

Open ruanyouxing opened 2 years ago

ruanyouxing commented 2 years ago

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](https://github.com/ruanyouxing/nvim/blob/main/lua/core/pack.lua) [modules folder](https://github.com/ruanyouxing/nvim/tree/main/lua/modules), based on [Cosynvim template](https://github.com/glepnir/cosynvim)
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`
wbthomason commented 2 years ago

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.

ruanyouxing commented 2 years ago

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

wbthomason commented 2 years ago

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.

ruanyouxing commented 2 years ago

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

bangedorrunt commented 2 years ago

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

wbthomason commented 2 years ago

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

ruanyouxing commented 2 years ago

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 commented 2 years ago

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

bangedorrunt commented 2 years ago

@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.

ruanyouxing commented 2 years ago

@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?

bangedorrunt commented 2 years ago

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.

arminveres commented 1 year ago

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'