mason.nvim
mason.nvim copied to clipboard
Nimlsp failed to build
I've searched open issues for similar requests
- [X] Yes
I've manually reviewed logs to find potential errors
- [X] Yes
I've recently downloaded the latest plugin version of mason.nvim
- [X] Yes
Problem description
A fresh install with nimlsp required yields the following:
From https://github.com/pmunch/nimlsp
* tag v0.4.4 -> FETCH_HEAD
+ nimble build -y --localdeps
Warning: Using project local deps mode
Verifying dependencies for [email protected]
Prompt: No local packages.json found, download it from internet? -> [forced yes]
Downloading Official package list
Success Package list downloaded.
Installing jsonschema@>= 0.2.1
Tip: 8 messages have been suppressed, use --verbose to show them.
nimble.nim(683) getDownloadInfo
Error: Package jsonschema@>= 0.2.1 not found.
spawn: bash failed with exit code 1 and signal 0.
Note I do install nim via choosenim but there's still problem.
Expected behavior
As above.
Steps to reproduce
- install mason
- install nimlsp
Affected packages
nimlsp
Neovim version (>= 0.7)
NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Operating system/version
Linux arch 6.3.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 30 May 2023 13:44:01 +0000 x86_64 GNU/Linux
Healthcheck
==============================================================================
mason: require("mason.health").check()
mason.nvim ~
- OK mason.nvim version v1.1.1
- 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: 2023-06-06-sinful-button` 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.21.4 built on linux-gnu.`
- OK curl: `curl 8.1.2 (x86_64-pc-linux-gnu) libcurl/8.1.2 OpenSSL/3.0.9 zlib/1.2.13 brotli/1.0.9 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.10.0 nghttp2/1.53.0`
- OK gzip: `gzip 1.12`
- OK tar: `tar (GNU tar) 1.34`
- OK bash: `GNU bash, version 5.1.16(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 Go: `go version go1.20.4 linux/amd64`
- OK Ruby: `ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]`
- OK node: `v20.2.0`
- OK cargo: `cargo 1.69.0 (6e9a83356 2023-04-12)`
- OK java: `openjdk version "20.0.1" 2023-04-18`
- OK python3: `Python 3.11.3`
- OK julia: `julia version 1.9.0`
- OK JAVA_HOME: `openjdk version "20.0.1" 2023-04-18`
- OK RubyGem: `3.3.25`
- OK javac: `javac 20.0.1`
- OK pip3: `pip 23.1.2 from /usr/lib/python3.11/site-packages/pip (python 3.11)`
- OK npm: `8.19.2`
mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Tue 06 Jun 2023 02:01:58 PM CST.
Install and authenticate via gh-cli to increase rate limit.
Nim environment
$ nim -v
Nim Compiler Version 1.9.3 [Linux: amd64]
Compiled at 2023-05-30
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 244565397ddcd4af5a49b47b7874fe82e018e429
active boot switches: -d:release
$ nimble -v
nimble v0.14.2 compiled at 2023-05-30 01:12:09
git hash: couldn't determine git hash
I can build it with nimble directly tho:
$ nimble install nimlsp
Downloading https://github.com/PMunch/nimlsp using git
Verifying dependencies for [email protected]
Info: Dependency on jsonschema@>= 0.2.1 already satisfied
Verifying dependencies for [email protected]
Info: Dependency on ast_pattern_matching@any version already satisfied
Verifying dependencies for [email protected]
Info: Dependency on asynctools@>= 0.1.1 already satisfied
Verifying dependencies for [email protected]
Installing [email protected]
Building nimlsp/nimlsp_debug using c backend
Building nimlsp/nimlsp using c backend
Success: nimlsp installed successfully.
$ nimlsp --version
nimlsp v0.4.4
I've been having similar issues with other packages; specifically with node2-debug-adapter, and because the build module sets set -euxo pipefail (https://github.com/williamboman/mason.nvim/blob/main/lua/mason-core/installer/managers/build.lua#L32), it results in an automatic exit of issues while running the build task, in my case, an unbound variable, likely on https://github.com/mason-org/mason-registry/blob/main/packages/node-debug2-adapter/package.yaml#L20.
Not sure if this is a similar issue for you.
/cc @williamboman
No idea why it might fail or how to fix it (not a nim dev). The installation only runs nimble build -y --localdeps inside the https://github.com/PMunch/nimlsp git repository. Maybe --localdeps is problematic, although I'd be unsure why. I've added the help wanted label for this issue.
I'd suggest using nimlangserver instead if that's an option.
- registry: https://github.com/mason-org/mason-registry/blob/main/packages/nimlangserver/package.yaml
- official page: https://github.com/nim-lang/langserver