lewis6991 / impatient.nvim

Improve startup time for Neovim
MIT License
1.19k stars 28 forks source link

attempt to call field 'encode' (a nil value) #38

Closed quantum-booty closed 2 years ago

quantum-booty commented 2 years ago

Nvim version: NVIM v0.6.0-dev+525-ge921e98ce

Error detected while processing VimEnter Autocommands for "*":
E5108: Error executing lua .../site/pack/packer/start/impatient.nvim/lua/impatient.lua:243: attempt to call field 'encode' (a nil value)

minimal config:

require('packer').startup({function()
    use 'wbthomason/packer.nvim'
    use 'lewis6991/impatient.nvim'
end,
    config = {
        compile_path = vim.fn.stdpath('config')..'/lua/packer_compiled.lua',
    }
})

require('impatient')
require('packer_compiled')
ofseed commented 2 years ago

I happened to have the same problem just now...

zeitchef commented 2 years ago

Me too...

ihasdapie commented 2 years ago

I think it has to do with this commit since changing it back to .pack and .unpack worked for me. https://github.com/lewis6991/impatient.nvim/commit/04320ed513643d7d869775f40529e41a7683648f

Updating mpack via luarocks to 1.09 does not fix the issue either and I'm on the latest neovim 0.6 nightly.

Not quite sure at what version of mpack the (decode/encode)/(unpack/pack) renaming happened but it doesn't seem to be bundled with neovim at the moment.

ihasdapie commented 2 years ago

Actually, it looks like https://github.com/neovim/neovim/pull/16175 was merged just 5 hours ago so maybe this will be fixed for nightly users by neovim's next CI run? Otherwise it would probably be good at have a little guard against people running older version of neovim.

ofseed commented 2 years ago

Actually, it looks like neovim/neovim#16175 was merged just 5 hours ago so maybe this will be fixed for nightly users by neovim's next CI run? Otherwise it would probably be good at have a little guard against people running older version of neovim.

You are right, I just compiled the latest neovim and this problem is solved. Thanks.

lewis6991 commented 2 years ago

Only 0.5.X or latest master is officially supported. If you want this fixed on an older 0.6 then PR's are welcome.

clason commented 2 years ago

(PSA: Neovim itself only supports 0.5.X or latest master, and the same should hold for plugins. If you grab the nightly tiger by the tail, you have to keep holding on...)

lewis6991 commented 2 years ago

27c783556dd3e4085a0a93063f242c888405d6b6 should stop old 0.6-dev installs breaking, though it is still recommended you upgrade to latest master or roll back to 0.5