mason-org / mason-registry

Core registry for mason.nvim.
https://mason-registry.dev/registry/list
Apache License 2.0
138 stars 318 forks source link

Haxe language server fails to install #4472

Open Tolomeo opened 6 months ago

Tolomeo commented 6 months ago

I am trying to use haxe-language-server in nvim, in conjunction with Mason, but the installation fails with the error: [ERROR Thu 8 Feb 02:45:29 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=haxe-language-server) error=spawn: bash failed with exit code 1 and signal 0. The error happens both with manual and automatic installation. I followed the breadcrumbs all the way to this repo, where I found the package spec where the installation procedure is described as a list of commands to run (https://github.com/mason-org/mason-registry/blob/main/packages/haxe-language-server/package.yaml). I debugged cloning the lsp repo manually and I think the issue is related to the build command (npx lix run ...) somehow expecting to be executed from the repo root. I tested using npx --prefix=path/to/repo ... with no luck. I managed to have a clean exit by walking into the dir and then back:

cd path/to/repo
npm ci
npx lix run vshaxe-build -t language-server
cd - >/dev/null

Not sure how to do something similar from the spec, if it is the right solution or if there is a better one. Thanks for the project

Tolomeo commented 6 months ago

Noticed the existence of a staged flag, which seems to be related Would that fix the issue? Would you like me to open a PR?