mason.nvim icon indicating copy to clipboard operation
mason.nvim copied to clipboard

Luarocks dependencies fail to install

Open beauwilliams opened this issue 3 years ago • 3 comments

I've made an initial investigation into the error myself

  • [X] Yes

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

  • [X] Yes

Problem description

Luarocks will fail to install packages if dependencies missing. Perhaps we need a flag here.

Original issue here: https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim/issues/14

Neovim version (>= 0.7)

NVIM v0.7.2 Build type: Release LuaJIT 2.1.0-beta3 Compiled by [email protected]

Features: +acl +iconv +tui See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.7.2_1/share/nvim"

Run :checkhealth for more info

Operating system/version

Darwin MacBook-Pro.beauhome 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64

Affected packages

luacheck

Actual behavior

Fails to install

Expected behavior

Installs lua deps and then installs the pkg

Mason output

No response

Installation log

[INFO  Sat 17 Sep 13:14:51 2022] ...acker/start/mason.nvim/lua/mason-core/installer/init.lua:110: Executing installer for Package(name=luacheck)
[ERROR Sat 17 Sep 13:14:53 2022] ...acker/start/mason.nvim/lua/mason-core/installer/init.lua:146: Installation failed for Package(name=luacheck) error=spawn: luarocks failed with exit code 99 and signal 0. 
[INFO  Sat 17 Sep 13:14:56 2022] ...acker/start/mason.nvim/lua/mason-core/installer/init.lua:110: Executing installer for Package(name=luacheck)
[ERROR Sat 17 Sep 13:14:58 2022] ...acker/start/mason.nvim/lua/mason-core/installer/init.lua:146: Installation failed for Package(name=luacheck) error=spawn: luarocks failed with exit code 99 and signal 0.

Healthcheck

Mason: require("Mason.health").check()
========================================================================
## mason.nvim report
  - OK: neovim version >= 0.7.0
  - OK: **Go**: `go version go1.19.1 darwin/arm64`
  - WARNING: **cargo**: unsupported version `cargo 1.44.0 (05d080faa 2020-05-06)`. Some cargo installations require Rust >= 1.60.0.
  - OK: **luarocks**: `/opt/homebrew/bin/luarocks 3.9.1`
  - WARNING: **Ruby**: not available
  - WARNING: **RubyGem**: not available
  - WARNING: **Composer**: not available
  - WARNING: **PHP**: not available
  - OK: **npm**: `8.1.2`
  - OK: **node**: `v16.13.1`
  - OK: **python3**: `Python 3.10.6`
  - OK: **pip3**: `pip 22.2.2 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)`
  - OK: **javac**: `javac 11.0.11`
  - OK: **java**: `java version "11.0.11" 2021-04-20 LTS`
  - WARNING: **julia**: not available
  - ERROR: **wget**: not available
  - OK: **curl**: `curl 7.79.1 (x86_64-apple-darwin21.0) libcurl/7.79.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.45.1`
  - OK: **gzip**: `Ok`
  - OK: **tar**: `bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 `
  - OK: **bash**: `GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)`
  - OK: **sh**: `Ok`
  - OK: **JAVA_HOME**: `java version "11.0.11" 2021-04-20 LTS`
  - ERROR: GitHub API rate limit exceeded. Used: 60. Remaining: 0. Limit: 60. Reset: Sat 17 Sep 14:06:36 2022.

Screenshots

No response

beauwilliams avatar Sep 17 '22 03:09 beauwilliams

What error message do you get?

williamboman avatar Sep 17 '22 15:09 williamboman

Here is the output from attempting to install luacheck fresh.

I moved the old install. Re-run the install command mason uses. You can see there is fails to install the first time.

I was able to re-run the command again to successfully install luacheck (as argpasrse dependency was installed at that point)

It might be an upstream bug however. I would not expect it to fail in this way to be fair to mason. We're just installing a package and one would expect it to work as we have tried it here,

beauwilliams avatar Sep 17 '22 23:09 beauwilliams

Yeah I'd recommend submitting an issue upstream, as the error message even suggests. Maybe a temporary workaround could be to run the command twice in Mason should it fail the first time 🤷‍♂️

williamboman avatar Sep 18 '22 14:09 williamboman