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

Deprecation of vim.tbl_xx functions trigger errors in latest Neovim versions #1711

Open
2 tasks done
twidxuga opened this issue May 16, 2024 · 0 comments
Open
2 tasks done

Comments

@twidxuga
Copy link

I've searched open issues for similar requests

  • Yes

I've recently downloaded the latest plugin version of mason.nvim

  • Yes

Problem description

vim.tbl_xx functions used in mason will be deprecated in neovim 0.12, and just started throwing errors when starting Neovim 0.11 (NVIM v0.11.0-dev in my case, compiled from the latest source). Deprecation details can be found here and here.

Though I found several references to vim.tbl_xx functions in the source code, the error that I currently have with mason is:

vim.tbl_flatten is deprecated, use vim.iter(…):flatten():totable() instead. :help deprecated
Feature will be removed in Nvim 0.12
stack traceback:
        vim/shared.lua:556: in function 'tbl_flatten'
        ...onfig/nvim/plugged/nvim-lspconfig/lua/lspconfig/util.lua:265: in function 'root_pattern'
        ...config/lua/lspconfig/server_configurations/omnisharp.lua:45: in main chunk
        [C]: in function 'require'
        ...ig.nvim/lua/mason-lspconfig/server_config_extensions.lua:4: in function <...ig.nvim/lua/mason-
lspconfig/server_config_extensions.lua:1>
        ...lugged/mason-lspconfig.nvim/lua/mason-lspconfig/init.lua:30: in function <...lugged/mason-lspconfig.nvim/lua/mason-lspconfig/init.lua:28>
        [C]: in function 'pcall'
        ...lugged/mason-lspconfig.nvim/lua/mason-lspconfig/init.lua:28: in function 'setup'
        /home/twidxuga/.config/nvim/lua/lspcfg.lua:85: in main chunk
        [C]: in function 'require'
/lua/nvimautopairs.lua:38: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

Thanks for a great project!
Cheers

Expected behavior

No errors/warnings when starting Neovim.

Steps to reproduce

  1. Update to the latest neovim, compiled from source.
  2. Install mason
  3. start neovim

Neovim version (>= 0.7)

NVIM v0.11.0-dev-4+ga66424617
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

Operating system/version

Linux twidarch 6.8.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 17 Apr 2024 15:20:28 +0000 x86_64 GNU/Linux

Healthcheck output

==============================================================================
mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.10.0
- OK PATH: prepend
- OK Providers: 
    mason.providers.registry-api
    mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2024-05-16-minute-hose` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send`
- OK wget: `GNU Wget 1.24.5 built on linux-gnu.`
- OK curl: `curl 8.7.1 (x86_64-pc-linux-gnu) libcurl/8.7.1 OpenSSL/3.2.1 zlib/1.3.1 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 libssh2/1.11.0 nghttp2/1.61.0 nghttp3/1.2.0`
- OK gzip: `gzip 1.13`
- OK tar: `tar (GNU tar) 1.35`
- OK bash: `GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- OK Ruby: `ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]`
- OK node: `v17.4.0`
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- OK cargo: `cargo 1.77.2`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK python: `Python 3.11.8`
- OK Go: `go version go1.22.2 linux/amd64`
- OK RubyGem: `3.3.25`
- OK java: `openjdk version "1.8.0_412"`
- OK JAVA_HOME: `openjdk version "1.8.0_412"`
- OK npm: `8.3.1`
- OK pip: `pip 24.0 from /usr/lib/python3.11/site-packages/pip (python 3.11)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Thu 16 May 2024 20:23:34 BST.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots

No response

@williambotman williambotman added this to Needs triage in Issue Triaging May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Issue Triaging
Needs triage
Development

No branches or pull requests

1 participant