You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've manually reviewed logs to find potential errors
Yes
I've recently downloaded the latest plugin version of mason.nvim
Yes
Problem description
Expanding the "LSP server configuration schema" for rust-analyzer gives the following error
Error executing vim.schedule lua callback: .../lazy/mason.nvim/lua/mason/ui/components/json-schema.lua:119: attempt to concatenate local 'key' (a n
il value)
stack traceback:
.../lazy/mason.nvim/lua/mason/ui/components/json-schema.lua:119: in function <.../lazy/mason.nvim/lua/mason/ui/components/json-schema.lua:4
7>
vim/shared.lua: in function 'map'
.../lazy/mason.nvim/lua/mason/ui/components/json-schema.lua:112: in function 'JsonSchema'
...mason.nvim/lua/mason/ui/components/main/package_list.lua:112: in function 'When'
...mason.nvim/lua/mason/ui/components/main/package_list.lua:106: in function 'When'
...mason.nvim/lua/mason/ui/components/main/package_list.lua:91: in function 'When'
...mason.nvim/lua/mason/ui/components/main/package_list.lua:172: in function 'list_item_renderer'
...mason.nvim/lua/mason/ui/components/main/package_list.lua:14: in function 'PackageListContainer'
...mason.nvim/lua/mason/ui/components/main/package_list.lua:201: in function 'Installed'
...mason.nvim/lua/mason/ui/components/main/package_list.lua:369: in function 'PackageList'
...im/lazy/mason.nvim/lua/mason/ui/components/main/init.lua:9: in function 'Main'
...cal/share/nvim/lazy/mason.nvim/lua/mason/ui/instance.lua:140: in function 'When'
...cal/share/nvim/lazy/mason.nvim/lua/mason/ui/instance.lua:137: in function 'renderer'
...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:496: in function 'debounced_fn'
...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:21: in function <...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:20
>
By adding a vim.print(shema) on the line right before the error happens, this is the last messages that got printed:
...
{
default = false,
markdownDescription = "Whether to show the main part of the rendered rustc output of a diagnostic message.",
type = "boolean"
}
{
default = false,
markdownDescription = "Whether to show diagnostics using the original rustc error code. If this is false, all rustc diagnostics will have the cod
e 'rustc(Click for full compiler diagnostics)'",
type = "boolean"
}
{
title = "$generated-start"
}
and then the error message.
by adding a
ifkey~=nilthenlabel=...elselabel="<no key>"end
Then there is no more error, and here is the displayed Json schema:
Linux xxx 6.9.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 16 Jun 2024 19:06:37 +0000 x86_64 GNU/Linux
Healthcheck
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-06-24-fatal-soy` is installed.
mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send`
- WARNING wget: not available
- ADVICE:
- spawn: wget failed with exit code - and signal -. wget is not executable
- OK curl: `curl 8.8.0 (x86_64-pc-linux-gnu) libcurl/8.8.0 OpenSSL/3.3.1 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.62.1 nghttp3/1.4.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
- WARNING Ruby: not available
- ADVICE:
- spawn: ruby failed with exit code - and signal -. ruby is not executable
- WARNING RubyGem: not available
- ADVICE:
- spawn: gem failed with exit code - and signal -. gem is not executable
- OK Go: `go version go1.22.4 linux/amd64`
- OK cargo: `cargo 1.79.0`
- WARNING julia: not available
- ADVICE:
- spawn: julia failed with exit code - and signal -. julia is not executable
- OK node: `v22.3.0`
- OK python: `Python 3.12.4`
- WARNING pip: not available
- ADVICE:
- spawn: python3 failed with exit code 1 and signal 0. /usr/bin/python3: No module named pip
- OK java: `openjdk version "21.0.3" 2024-04-16`
- WARNING javac: not available
- ADVICE:
- spawn: javac failed with exit code 1 and signal 0. Error: Unable to load main class com.sun.tools.javac.Main in module jdk.compiler
java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-21-openjdk/lib/libnio.so: /usr/lib/jvm/java-21-openjdk/lib/libnio.so: undefined symbol: reuseport_available
Runtime.exit(1) logging failed: Could not initialize class jdk.internal.module.SystemModuleFinders$SystemImage
- OK python venv: `Ok`
- OK npm: `10.8.1`
mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 12. Remaining: 48. Limit: 60. Reset: Mon 24 Jun 2024 05:12:57 PM CST.
Install and authenticate via gh-cli to increase rate limit.
Screenshots or recordings
No response
The text was updated successfully, but these errors were encountered:
Hi, the issue involves a JsonSchema error for the rust-analyzer configuration schema in the mason.nvim plugin. To solve it:
1. Identify the source of the error in json-schema.lua at line 119, where a nil value is being concatenated.
2. Add a conditional check to handle the nil value by setting a default label if key is nil.
3. Test the modified code to ensure it displays the configuration schema correctly without errors.
I've searched open issues for similar requests
I've manually reviewed logs to find potential errors
I've recently downloaded the latest plugin version of mason.nvim
Problem description
Expanding the "LSP server configuration schema" for rust-analyzer gives the following error
By adding a
vim.print(shema)
on the line right before the error happens, this is the last messages that got printed:and then the error message.
by adding a
Then there is no more error, and here is the displayed Json schema:
Expected behavior
Show the server configuration json schema without error
Steps to reproduce
37a336b
):Mason
Affected packages
rust-analyzer
Neovim version (>= 0.7)
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478
Operating system/version
Linux xxx 6.9.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 16 Jun 2024 19:06:37 +0000 x86_64 GNU/Linux
Healthcheck
Screenshots or recordings
No response
The text was updated successfully, but these errors were encountered: