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

vim.tbl_islist is deprecated #339

Closed
kflak opened this issue May 17, 2024 · 6 comments
Closed

vim.tbl_islist is deprecated #339

kflak opened this issue May 17, 2024 · 6 comments

Comments

@kflak
Copy link

kflak commented May 17, 2024

Hi,

Getting this warning on launching nvim after the latest update of neovim-git from aur:

vim.tbl_islist is deprecated, use vim.islist instead. :help deprecated
Feature will be removed in Nvim 0.12
stack traceback:
        vim/shared.lua: in function 'tbl_islist'
        ...e/kf/.local/share/nvim/rocks/share/lua/5.1/dial/util.lua:41: in function 'validate_list'
        .../share/nvim/rocks/share/lua/5.1/dial/augend/constant.lua:39: in function 'new'
        .../share/nvim/rocks/share/lua/5.1/dial/augend/constant.lua:133: in main chunk
        [C]: in function 'require'
        ...kf/.local/share/nvim/rocks/share/lua/5.1/dial/augend.lua:2: in main chunk
        [C]: in function 'require'
        ...kf/.local/share/nvim/rocks/share/lua/5.1/dial/config.lua:1: in main chunk
        [C]: in function 'require'
        ...f/.local/share/nvim/rocks/share/lua/5.1/dial/command.lua:4: in main chunk
        [C]: in function 'require'
        /home/kf/.local/share/nvim/rocks/share/lua/5.1/dial/map.lua:3: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk
vim.tbl_add_reverse_lookup is deprecated. :help deprecated
Feature will be removed in Nvim 0.12
stack traceback:
        vim/shared.lua: in function 'tbl_add_reverse_lookup'
        .../.local/share/nvim/rocks/share/lua/5.1/cmp/types/lsp.lua:131: in main chunk
        [C]: in function 'require'
        ....local/share/nvim/rocks/share/lua/5.1/cmp/types/init.lua:4: in main chunk
        [C]: in function 'require'
        ...s/lib/luarocks/rocks-5.1/nvim-cmp/0.0.1-2/plugin/cmp.lua:11: in main chunk

Version:

NVIM v0.11.0-dev-9+g42aa69b076
Build type: RelWithDebInfo
LuaJIT 2.1.1713773202

I'm guessing there are a few plugins that use the deprecated functions, but some of it seems to be rocks-specific?

@mrcjkb
Copy link
Member

mrcjkb commented May 17, 2024

Hey 👋

We have CI actions that make sure we don't use any deprecated APIs in rocks.nvim and its extensions.

In the stack trace you posted, it's

  • dial.nvim, which is using vim.tbl_is_list.
  • nvim-cmp, which is using vim.tbl_add_reverse_lookup.

Note: the nvim-cmp package on luarocks is very outdated. I have opened a PR that will hopefully fix that:

Haven't received a response yet, though 😢
As a temporary workaround, you can install nvim-cmp with rocks-git.nvim.

@mrcjkb mrcjkb closed this as completed May 17, 2024
@kflak
Copy link
Author

kflak commented May 17, 2024

Cool, thanks! I tried with the git-version of nvim-cmp, but I was getting an even bigger wall of deprecation warnings. The tagged version over there is still 0.0.1, which is indeed horribly out of date.

When using the very last commit, I am only getting vim.tbl_add_reverse_lookup is deprecated. Which is a bit weird, as this should be fixed in an earlier commit... Oh well, I'll hop over to the nvim-cmp issue tracker and start bugging them instead :-) Or just wait for a couple of days for the updates to settle...

@mrcjkb
Copy link
Member

mrcjkb commented May 17, 2024

That is very strange indeed.
I can't find any occurrences of it in a source code search (on the main branch).

Maybe rocks-git didn't pick up like latest commit for some reason?
I would suggest pruning and reinstalling it.

@kflak
Copy link
Author

kflak commented May 17, 2024

Sorry, my bad... got confused by the next batch of errors popping up, this time related to nvim-lspconfig. I've pinned nvim-cmp and nvim-lspconfig to the latest commits for now, which seems to have solved the problem for now.

@mrcjkb
Copy link
Member

mrcjkb commented May 18, 2024

I've opened an issue for lspconfig:

@kflak
Copy link
Author

kflak commented May 18, 2024

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants