williamboman/mason.nvim

Error while installing phpactor

julj opened this issue · 1 comments

julj commented

I've searched open issues for similar requests

  • Yes

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

  • Yes

Problem description

I have a Docker container with php and composer installed. I want to install phpactor (from the host). I created the following scripts:

composer

#!/bin/bash
docker exec mycontainer composer "$@"

php

#!/bin/bash
docker exec mycontainer php "$@"

in ~/.bin and added ~/.bin to the PATH with vim.env.PATH = vim.env.PATH .. ':~/.bin'

Then when I attempt to install phpactor with Mason I get the error given below (see Mason output field).

Expected behavior

No error

Affected packages

phpactor

Mason output

◍ phpactor
      ▼ Displaying full log
        83 packages you are using are looking for funding.
        Use the `composer fund` command to find out more!

        Run composer recipes at any time to see the status of your Symfony recipes.

        Executing script cache:clear [KO]
         [KO]
        Script cache:clear returned with error code 255
        !!  Symfony\Component\ErrorHandler\Error\ClassNotFoundError {#89
        !!    #message: """
        !!      Attempted to load class "WebProfilerBundle" from namespace "Symfony\Bundle\WebProfilerBundle".\n
        !!      Did you forget a "use" statement for another namespace?
        !!      """
        !!    #code: 0
        !!    #file: "./vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php"
        !!    #line: 126
        !!    trace: {
        !!      ./vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:126 { …}
        !!      ./vendor/symfony/http-kernel/Kernel.php:331 { …}
        !!      ./vendor/symfony/http-kernel/Kernel.php:708 { …}
        !!      ./vendor/symfony/http-kernel/Kernel.php:122 { …}
        !!      ./vendor/symfony/framework-bundle/Console/Application.php:148 { …}
        !!      ./vendor/symfony/framework-bundle/Console/Application.php:69 { …}
        !!      ./vendor/symfony/console/Application.php:168 { …}
        !!      ./bin/console:43 {
        !!        › $application = new Application($kernel);
        !!        › $application->run($input);
        !!        › 
        !!        arguments: {
        !!          $input: Symfony\Component\Console\Input\ArgvInput {#2 …}
        !!        }
        !!      }
        !!    }
        !!  }
        !!  2024-03-27T16:50:57+00:00 [critical] Uncaught Error: Class "Symfony\Bundle\WebProfilerBundle\WebProfilerBundle" not found
        !!  
        Script @auto-scripts was called via post-install-cmd
        spawn: bash failed with exit code 255 and signal 0. 


### Installation log

```Text
[INFO  Thu 28 Mar 2024 08:48:55 CET] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=phpactor) {}
[DEBUG Thu 28 Mar 2024 08:48:55 CET] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:58: Attempting to lock package Package(name=phpactor)
[DEBUG Thu 28 Mar 2024 08:48:55 CET] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:70: Wrote lockfile Package(name=phpactor)
[DEBUG Thu 28 Mar 2024 08:48:55 CET] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:71: fs: mkdirp /home/jricard/.local/share/nvim/mason/staging/phpactor
[DEBUG Thu 28 Mar 2024 08:48:55 CET] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:149: Compiling installer. phpactor {}
[DEBUG Thu 28 Mar 2024 08:48:55 CET] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:247: std: clone "https://github.com/phpactor/phpactor.git" {
  rev = "2024.03.09.0"
}
[DEBUG Thu 28 Mar 2024 08:48:55 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="git", spawn_opts={
  args = { "clone", "--depth", "1", "https://github.com/phpactor/phpactor.git", "." },
  cwd = "/home/jricard/.local/share/nvim/mason/staging/phpactor"
}
[DEBUG Thu 28 Mar 2024 08:48:55 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 400358
[DEBUG Thu 28 Mar 2024 08:48:56 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=400358 exited with exit_code=0, signal=0
[DEBUG Thu 28 Mar 2024 08:48:56 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="git", spawn_opts={
  args = { "fetch", "--depth", "1", "origin", "2024.03.09.0" },
  cwd = "/home/jricard/.local/share/nvim/mason/staging/phpactor"
}
[DEBUG Thu 28 Mar 2024 08:48:56 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 400373
[DEBUG Thu 28 Mar 2024 08:48:57 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=400373 exited with exit_code=0, signal=0
[DEBUG Thu 28 Mar 2024 08:48:57 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="git", spawn_opts={
  args = { "checkout", "--quiet", "FETCH_HEAD" },
  cwd = "/home/jricard/.local/share/nvim/mason/staging/phpactor"
}
[DEBUG Thu 28 Mar 2024 08:48:57 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 400385
[DEBUG Thu 28 Mar 2024 08:48:57 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=400385 exited with exit_code=0, signal=0
[DEBUG Thu 28 Mar 2024 08:48:57 CET] .../mason.nvim/lua/mason-core/installer/managers/common.lua:100: build: run {
  env = {
    MASON_VERSION = "2024.03.09.0"
  },
  run = "composer install --no-interaction --no-dev --optimize-autoloader --classmap-authoritative",
  target = "unix"
}
[DEBUG Thu 28 Mar 2024 08:48:57 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="bash", spawn_opts={
  args = {},
  cwd = "/home/jricard/.local/share/nvim/mason/staging/phpactor",
  env = { "XDG_RUNTIME_DIR=<redacted>", "TERM=<redacted>", "XDG_SESSION_TYPE=<redacted>", "GNOME_SETUP_DISPLAY=<redacted>", "VIM=<redacted>", "GNOME_TERMINAL_SERVICE=<redacted>", "SSH_AUTH_SOCK=<redacted>", "GDM_LANG=<redacted>", "HISTTIMEFORMAT=<redacted>", "LANG=<redacted>", "USER=<redacted>", "_CE_M=<redacted>", "XDG_MENU_PREFIX=<redacted>", "NVIM_LOG_FILE=<redacted>", "SHELL=<redacted>", "HOME=<redacted>", "SESSION_MANAGER=<redacted>", "KRB5CCNAME=<redacted>", "OLDPWD=<redacted>", "VTE_VERSION=<redacted>", "HISTSIZE=<redacted>", "GNOME_DESKTOP_SESSION_ID=<redacted>", "PATH=/home/jricard/.local/share/nvim/mason/bin:/home/jricard/.local/nvim/bin/:/home/jricard/.local/bin/Image-ExifTool-12.77:/home/jricard/.nodejs/node-v18.18.0-linux-x64/bin:/home/jricard/.mambaforge/condabin:/home/jricard/.local/bin:/home/jricard/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/jricard/.fzf/bin:/home/jricard/.bin", "COLORTERM=<redacted>", "USERNAME=<redacted>", "XDG_SESSION_CLASS=<redacted>", "XMODIFIERS=<redacted>", "WAYLAND_DISPLAY=<redacted>", "QT_ACCESSIBILITY=<redacted>", "SSH_AGENT_LAUNCHER=<redacted>", "CONDA_PYTHON_EXE=<redacted>", "DISPLAY=<redacted>", "XDG_SESSION_DESKTOP=<redacted>", "SHLVL=<redacted>", "_CE_CONDA=<redacted>", "IM_CONFIG_PHASE=<redacted>", "HISTFILESIZE=<redacted>", "DESKTOP_SESSION=<redacted>", "PROMPT_DIRTRIM=<redacted>", "CONDA_EXE=<redacted>", "PWD=<redacted>", "QT_IM_MODULE=<redacted>", "MYVIMRC=<redacted>", "LS_COLORS=<redacted>", "XDG_CURRENT_DESKTOP=<redacted>", "CONDA_SHLVL=<redacted>", "VIMRUNTIME=<redacted>", "GTK_MODULES=<redacted>", "XAUTHORITY=<redacted>", "GNOME_TERMINAL_SCREEN=<redacted>", "GDMSESSION=<redacted>", "LOGNAME=<redacted>", "DBUS_SESSION_BUS_ADDRESS=<redacted>", "_=<redacted>", "MASON=<redacted>", "MASON_VERSION=<redacted>" }
}
[DEBUG Thu 28 Mar 2024 08:48:57 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 400396
[DEBUG Thu 28 Mar 2024 08:49:02 CET] ...ocal/share/nvim/lazy/mason.nvim/lua/mason-core/fetch.lua:37: Fetching URL "https://api.mason-registry.dev/api/github/mason-org/mason-registry/releases/latest"
[DEBUG Thu 28 Mar 2024 08:49:02 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="curl", spawn_opts={
  args = { "-H", "Accept: application/vnd.mason-registry.v1+json; q=1.0, application/json; q=0.8", "-H", "User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim)", "-fsSL", "-X", "GET", "--connect-timeout", 30, "https://api.mason-registry.dev/api/github/mason-org/mason-registry/releases/latest" }
}
[DEBUG Thu 28 Mar 2024 08:49:02 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 400454
[DEBUG Thu 28 Mar 2024 08:49:02 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=400454 exited with exit_code=0, signal=0
[DEBUG Thu 28 Mar 2024 08:49:02 CET] ...ocal/share/nvim/lazy/mason.nvim/lua/mason-core/fetch.lua:37: Fetching URL "https://github.com/mason-org/mason-registry/releases/download/2024-03-28-absurd-thread/registry.json.zip"
[DEBUG Thu 28 Mar 2024 08:49:02 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="curl", spawn_opts={
  args = { "-H", "User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim)", "-fsSL", "-X", "GET", "-o", "/home/jricard/.local/share/nvim/mason/registries/github/mason-org/mason-registry/registry.json.zip", "--connect-timeout", 30, "https://github.com/mason-org/mason-registry/releases/download/2024-03-28-absurd-thread/registry.json.zip" }
}
[DEBUG Thu 28 Mar 2024 08:49:02 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 400456
[DEBUG Thu 28 Mar 2024 08:49:03 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=400456 exited with exit_code=0, signal=0
[DEBUG Thu 28 Mar 2024 08:49:03 CET] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink /home/jricard/.local/share/nvim/mason/registries/github/mason-org/mason-registry/registry.json.zip
[DEBUG Thu 28 Mar 2024 08:49:03 CET] ...ocal/share/nvim/lazy/mason.nvim/lua/mason-core/fetch.lua:37: Fetching URL "https://github.com/mason-org/mason-registry/releases/download/2024-03-28-absurd-thread/checksums.txt"
[DEBUG Thu 28 Mar 2024 08:49:03 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="curl", spawn_opts={
  args = { "-H", "User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim)", "-fsSL", "-X", "GET", "--connect-timeout", 30, "https://github.com/mason-org/mason-registry/releases/download/2024-03-28-absurd-thread/checksums.txt" }
}
[DEBUG Thu 28 Mar 2024 08:49:03 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 400459
[DEBUG Thu 28 Mar 2024 08:49:03 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=400459 exited with exit_code=0, signal=0
[DEBUG Thu 28 Mar 2024 08:49:11 CET] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=400396 exited with exit_code=255, signal=0
[DEBUG Thu 28 Mar 2024 08:49:11 CET] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink /home/jricard/.local/share/nvim/mason/staging/phpactor.lock
[DEBUG Thu 28 Mar 2024 08:49:11 CET] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf /home/jricard/.local/share/nvim/mason/staging/phpactor
[DEBUG Thu 28 Mar 2024 08:49:11 CET] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=phpactor)
[ERROR Thu 28 Mar 2024 08:49:11 CET] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=phpactor) error=spawn: bash failed with exit code 255 and signal 0. 


### Neovim version (>= 0.7)

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1692716794

### Operating system/version

Linux cigale 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux

### Healthcheck

```Text
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-03-28-absurd-thread` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.`
- OK wget: `GNU Wget 1.21 built on linux-gnu.`
- OK curl: `curl 7.74.0 (x86_64-pc-linux-gnu) libcurl/7.74.0 OpenSSL/1.1.1w zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0 librtmp/2.3`
- OK gzip: `gzip 1.10`
- OK tar: `tar (GNU tar) 1.34`
- OK bash: `GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING Go: not available
  - ADVICE:
    - spawn: go failed with exit code - and signal -. go is not executable
- WARNING cargo: not available
  - ADVICE:
    - spawn: cargo failed with exit code - and signal -. cargo is not executable
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- OK Ruby: `ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu]`
- OK node: `v18.18.0`
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- OK java: `openjdk version "11.0.22" 2024-01-16`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK python: `Python 3.9.2`
- OK RubyGem: `3.2.5`
- OK PHP: `PHP 8.2.17 (cli) (built: Mar 16 2024 01:42:13) (NTS)`
- OK Composer: `Composer version 2.7.2 2024-03-11 17:12:18`
- OK npm: `9.8.1`
- OK pip: `pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Thu 28 Mar 2024 09:54:04 CET.
  Install and authenticate via gh-cli to increase rate limit.


### Screenshots

_No response_
julj commented

I installed php and composer on my host, and the mason's phpactor runs flawlessly. But I would like to avoid having two php and composer install (one on my host and one in my container). Is there any way I can use the composer installed in my container to install phpactor with mason ?