williamboman / mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
Apache License 2.0
7.86k stars 276 forks source link

R language server failed to install due to missing branch ref #1238

Open hongyuanjia opened 1 year ago

hongyuanjia commented 1 year ago

I've searched open issues for similar requests

Yes

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

Problem description

I see in recent commits r-languageserver was created under mason-org to handle R language server installation. The install script requires a string indicating Git reference. However, it looks like the install script did not get the Git reference passed somehow. As you can see from the mason output:

        arguments to remotes::install_github: REditorSupport/languageserver, , never, 23
        calling remotes::install_github to install languageserver
        Using github PAT from envvar GITHUB_PAT
        Error: Failed to install 'unknown package' from GitHub:
          cannot open URL 'https://api.github.com/repos/REditorSupport/languageserver/contents/DESCRIPTION?ref='

Expected behavior

Successfully install R language server.

Affected packages

r-languageserver

Mason output

Cloning into '.'...
        From https://github.com/mason-org/r-languageserver
         * tag               v0.3.15    -> FETCH_HEAD

        R version 4.2.3 (2023-03-15 ucrt) -- "Shortstop Beagle"
        Copyright (C) 2023 The R Foundation for Statistical Computing
        Platform: x86_64-w64-mingw32/x64 (64-bit)

        R是自由软件,不带任何担保。
        在某些条件下你可以将其自由散布。
        用'license()'或'licence()'来看散布的详细条件。

        R是个合作计划,有许多人为之做出了贡献.
        用'contributors()'来看合作者的详细情况
        用'citation()'会告诉你如何在出版物中正确地引用R或R程序包。

        用'demo()'来看一些示范程序,用'help()'来阅读在线帮助文件,或
        用'help.start()'通过HTML浏览器来看帮助文件。
        用'q()'退出R.

        > args <- commandArgs(trailingOnly = TRUE)
        > 
        > langserver_library <- args[1]
        > ref <- args[2]
        > 
        > options(langserver_library = langserver_library)
        > options(langserver_quiet = FALSE)
        > options(repos = list(CRAN = "http://cran.rstudio.com/"))
        > rls_lib <- getOption("langserver_library")
        > .libPaths(new = rls_lib)
        > did_install_remotes <- FALSE
        > tryCatch(
        +   expr = {
        +     library("remotes")
        +   },
        +   error = function(e) {
        +     install.packages("remotes", lib = rls_lib, dependencies = TRUE)
        +     loadNamespace("remotes", lib.loc = rls_lib)
        +     did_install_remotes <- TRUE
        +   }
        + )
        > 
        > # We set force = TRUE because this command will error if languageserversetup is
        > # already installed (even if it's at a different library location).
        > remotes::install_github("jozefhajnala/languageserversetup", lib = rls_lib, force = TRUE)
        Using github PAT from envvar GITHUB_PAT
        Downloading GitHub repo jozefhajnala/languageserversetup@HEAD
        Running `R CMD build`...
        * checking for file 'C:\Users\hongy\AppData\Local\Temp\Rtmpo5VymZ\remotes10b859a17178\jozefhajnala-languageserversetup-3daf44a/DESCRIPTION' ... OK
        * preparing 'languageserversetup':
        * checking DESCRIPTION meta-information ... OK
        * checking for LF line-endings in source and make files and shell scripts
        * checking for empty or unneeded directories
        Omitted 'LazyData' from DESCRIPTION
        * building 'languageserversetup_0.1.2.900.tar.gz'
        * installing *source* package 'languageserversetup' ...
        ** using staged installation
        ** R
        ** inst
        ** byte-compile and prepare package for lazy loading
        ** help
        *** installing help indices
        ** building package indices
        ** testing if installed package can be loaded from temporary location
        ** testing if installed package can be loaded from final location
        ** testing if installed package keeps a record of temporary installation path
        * DONE (languageserversetup)
        > if (did_install_remotes) {
        +   remove.packages("remotes", lib = rls_lib)
        + }
        > 
        > loadNamespace("languageserversetup", lib.loc = rls_lib)
        <environment: namespace:languageserversetup>
        > languageserversetup::languageserver_install(
        +   fullReinstall = FALSE,
        +   confirmBeforeInstall = FALSE,
        +   strictLibrary = TRUE,
        +   ref = ref
        + )
        Keeping option: 'langserver_library' value: C:\Users\hongy\AppData\Local\nvim-data\mason\.packages\r-languageserver\build
        Setting option: 'langserver_processPatt' to: languageserver::run
        Keeping option: 'langserver_quiet' value: FALSE
        Setting option: 'langserver_quiet_serverproc' to: FALSE
        Setting option: 'langserver_rprofile_candidates' to: C:\Users\hongy/.Rprofile
        system_dep_available not found, determining
            sysname is windows, pid is: 4280
            get_docall_args: class(pid)=windows, pid=4280
            setting get_docall_args: system, list(command = "wmic process where processid=4280 get commandline", intern = FALSE, ignore.stdout = TRUE)
        system_dep_available determined: TRUE
        langserver_install Starting
        determined new .lib.loc: C:\Users\hongy\AppData\Local\nvim-data\mason\.packages\r-languageserver\build, C:/Users/hongy/scoop/apps/r/4.2.3/library
        assigning C:\Users\hongy\AppData\Local\nvim-data\mason\.packages\r-languageserver\buildC:/Users/hongy/scoop/apps/r/4.2.3/library to .lib.loc
        running dev installation
        installing remotes into: C:\Users\hongy\AppData\Local\nvim-data\mason\.packages\r-languageserver\build
        Warning: package 'remotes' is in use and will not be installed
        arguments to remotes::install_github: REditorSupport/languageserver, , never, 23
        calling remotes::install_github to install languageserver
        Using github PAT from envvar GITHUB_PAT
        Error: Failed to install 'unknown package' from GitHub:
          cannot open URL 'https://api.github.com/repos/REditorSupport/languageserver/contents/DESCRIPTION?ref='
        langserver_install Exiting
        Execution halted
        ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:53: rmrf: Could not remove directory "C:\\Users\\hongy\\AppData\\Local\\nvim-data\\mason\\packages\\r-languageserver".

### Installation log

```Text
[INFO  2023/4/19 21:05:45] ...m-data/lazy/mason.nvim/lua/mason-core/installer/init.lua:166: Executing installer for Package(name=r-languageserver) {}
[DEBUG 2023/4/19 21:05:45] ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:71: fs: mkdirp C:\Users\hongy\AppData\Local\nvim-data\mason\.packages\r-languageserver
[DEBUG 2023/4/19 21:05:45] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:142: Compiling installer. r-languageserver {}
[DEBUG 2023/4/19 21:05:45] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:106: Parsing spec r-languageserver {}
[DEBUG 2023/4/19 21:05:45] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:242: std: clone "https://github.com/mason-org/r-languageserver.git" {
  rev = "v0.3.15"
}
[DEBUG 2023/4/19 21:05:45] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="git", spawn_opts={
  args = { "clone", "--depth", "1", "https://github.com/mason-org/r-languageserver.git", "." },
  cwd = "C:\\Users\\hongy\\AppData\\Local\\nvim-data\\mason\\.packages\\r-languageserver"
}
[DEBUG 2023/4/19 21:05:45] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 8332
[DEBUG 2023/4/19 21:05:47] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=8332 exited with exit_code=0, signal=0
[DEBUG 2023/4/19 21:05:47] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="git", spawn_opts={
  args = { "fetch", "--depth", "1", "origin", "v0.3.15" },
  cwd = "C:\\Users\\hongy\\AppData\\Local\\nvim-data\\mason\\.packages\\r-languageserver"
}
[DEBUG 2023/4/19 21:05:47] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 17776
[DEBUG 2023/4/19 21:05:49] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=17776 exited with exit_code=0, signal=0
[DEBUG 2023/4/19 21:05:49] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="git", spawn_opts={
  args = { "checkout", "--quiet", "FETCH_HEAD" },
  cwd = "C:\\Users\\hongy\\AppData\\Local\\nvim-data\\mason\\.packages\\r-languageserver"
}
[DEBUG 2023/4/19 21:05:49] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 14284
[DEBUG 2023/4/19 21:05:49] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=14284 exited with exit_code=0, signal=0
[DEBUG 2023/4/19 21:05:49] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="pwsh", spawn_opts={
  args = { "-NoProfile", "-NonInteractive", "-Command", " $ErrorActionPreference = \"Stop\";  $ProgressPreference = 'SilentlyContinue';  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; .\\bin\\install.ps1 \"$env:VERSION\"" },
  cwd = "C:\\Users\\hongy\\AppData\\Local\\nvim-data\\mason\\.packages\\r-languageserver",
  env = { "RUSTUP_HOME=<redacted>", "TMP=<redacted>", "PSMODULEPATH=<redacted>", "KOMOREBI_CONFIG_HOME=<redacted>", "PROCESSOR_IDENTIFIER=<redacted>", "PROCESSOR_ARCHITECTURE=<redacted>", "TERM_PROGRAM_VERSION=<redacted>", "COMPUTERNAME=<redacted>", "VIM=<redacted>", "WEZTERM_EXECUTABLE=<redacted>", "_ZL_RANDOM=<redacted>", "HOMEPATH=<redacted>", "SYSTEMDRIVE=<redacted>", "LUA_EXE_PATH=<redacted>", "LUA_CPATH=<redacted>", "LOGONSERVER=<redacted>", "EDITOR=<redacted>", "COLORTERM=<redacted>", "USERNAME=<redacted>", "NUMBER_OF_PROCESSORS=<redacted>", "HOMEDRIVE=<redacted>", "COMSPEC=<redacted>", "CARGO_HOME=<redacted>", "STARSHIP_SHELL=<redacted>", "GIT_EDITOR=<redacted>", "USERDOMAIN_ROAMINGPROFILE=<redacted>", "COMMONPROGRAMW6432=<redacted>", "LOCALAPPDATA=<redacted>", "WEZTERM_CONFIG_DIR=<redacted>", "=<redacted>", "USERDOMAIN=<redacted>", "PROCESSOR_REVISION=<redacted>", "CHOCOLATEYLASTPATHUPDATE=<redacted>", "PROCESSOR_LEVEL=<redacted>", "SYSTEMROOT=<redacted>", "WEZTERM_UNIX_SOCKET=<redacted>", "DRIVERDATA=<redacted>", "PROGRAMW6432=<redacted>", "WINDIR=<redacted>", "GIT_INSTALL_ROOT=<redacted>", "WSLENV=<redacted>", "PATH=C:\\Users\\hongy\\AppData\\Local\\nvim-data\\mason\\bin;C:\\Users\\hongy\\AppData\\Local\\nvim-data\\mason\\bin;C:\\Users\\hongy\\scoop\\apps\\pwsh\\current;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\ProgramData\\chocolatey\\bin;;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Users\\hongy\\scoop\\apps\\vscode\\current\\bin;C:\\Users\\hongy\\scoop\\apps\\rustup\\current\\.cargo\\bin;C:\\Users\\hongy\\scoop\\apps\\mingw\\current\\bin;C:\\Users\\hongy\\scoop\\apps\\ghostscript\\current\\lib;C:\\Users\\hongy\\scoop\\shims;C:\\Users\\hongy\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\R\\bin;C:\\Users\\hongy\\scoop\\apps\\tinytex\\current\\bin\\windows;C:\\Users\\hongy\\scoop\\apps\\neovim\\current\\bin;C:\\Users\\hongy\\scoop\\apps\\neovim\\current\\bin", "OS=<redacted>", "WEZTERM_PANE=<redacted>", "PUBLIC=<redacted>", "ONEDRIVE=<redacted>", "COMMONPROGRAMFILES=<redacted>", "COMMONPROGRAMFILES(X86)=<redacted>", "USERPROFILE=<redacted>", "PROGRAMFILES(X86)=<redacted>", "PROGRAMDATA=<redacted>", "STARSHIP_CONFIG=<redacted>", "APPDATA=<redacted>", "CHOCOLATEYINSTALL=<redacted>", "TERM_PROGRAM=<redacted>", "PROGRAMFILES=<redacted>", "TEMP=<redacted>", "MASON=<redacted>", "ZES_ENABLE_SYSMAN=<redacted>", "TERM=<redacted>", "SESSIONNAME=<redacted>", "=<redacted>", "PATHEXT=<redacted>", "WEZTERM_CONFIG_FILE=<redacted>", "HOME=<redacted>", "VIRTUAL_ENV_DISABLE_PROMPT=<redacted>", "WEZTERM_EXECUTABLE_DIR=<redacted>", "VIMRUNTIME=<redacted>", "MYVIMRC=<redacted>", "STARSHIP_SESSION_KEY=<redacted>", "ALLUSERSPROFILE=<redacted>", "NVIM_LOG_FILE=<redacted>", "MASON_VERSION=<redacted>" }
}
[DEBUG 2023/4/19 21:05:49] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 24352
[DEBUG 2023/4/19 21:05:58] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=24352 exited with exit_code=0, signal=0
[DEBUG 2023/4/19 21:05:58] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:150: Registering bin links Package(name=r-languageserver) {
  ["r-languageserver"] = "{{source.build.bin}}"
}
[DEBUG 2023/4/19 21:05:58] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:174: Expanded bin link "r-languageserver" -> "./bin/r-languageserver.cmd"
[DEBUG 2023/4/19 21:05:58] ...ata/lazy/mason.nvim/lua/mason-core/installer/context.lua:212: Promoting cwd "C:\\Users\\hongy\\AppData\\Local\\nvim-data\\mason\\.packages\\r-languageserver" to "C:\\Users\\hongy\\AppData\\Local\\nvim-data\\mason\\packages\\r-languageserver"
[DEBUG 2023/4/19 21:05:58] ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf C:\Users\hongy\AppData\Local\nvim-data\mason\packages\r-languageserver
[DEBUG 2023/4/19 21:05:58] ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:52: fs: rmrf failed
[ERROR 2023/4/19 21:05:58] ...m-data/lazy/mason.nvim/lua/mason-core/installer/init.lua:200: Installation failed for Package(name=r-languageserver) error='...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:53: rmrf: Could not remove directory "C:\\\\Users\\\\hongy\\\\AppData\\\\Local\\\\nvim-data\\\\mason\\\\packages\\\\r-languageserver".'
[DEBUG 2023/4/19 21:05:58] ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf C:\Users\hongy\AppData\Local\nvim-data\mason\.packages\r-languageserver
[DEBUG 2023/4/19 21:05:58] ...m-data/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=r-languageserver)
[DEBUG 2023/4/19 21:05:58] ...data/lazy/mason.nvim/lua/mason-core/installer/linker.lua:42: Unlinking Package(name=r-languageserver)

### Neovim version (>= 0.7)

NVIM v0.9.0 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe /MD /Zi /O2 /Ob1 -W3 -wd4311 -wd4146 -DUNIT_TESTING -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602 -DMSWIN -DINCLUDEGENERATED DECLARATIONS -ID:/a/neovim/neovim/.deps/usr/include/luajit-2.1 -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include -ID:/a/neovim/neovim/build/cmake.config -ID:/a/neovim/neovim/src -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include

system vimrc file: "$VIM\sysinit.vim" fall-back for $VIM: "C:/Program Files (x86)/nvim/share/nvim"


### Operating system/version

Windows 10 22H2

### Healthcheck

```Text
==============================================================================
mason: require("mason.health").check()

mason.nvim ~
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `require("mason-registry.index")` is installed.
- OK Registry `github.com/mason-org/mason-registry version: 2023-04-19-civil-nic` is installed.
- OK Registry `require("mason-registry.index")` is installed.
- OK Registry `github.com/mason-org/mason-registry version: 2023-04-19-civil-nic` is installed.

mason.nvim [Core utils] ~
- WARNING unzip: not available
  - ADVICE:
    - spawn: unzip failed with exit code - and signal -. unzip is not executable
- WARNING wget: not available
  - ADVICE:
    - spawn: wget failed with exit code - and signal -. wget is not executable
- OK curl: `curl 7.83.1 (Windows) libcurl/7.83.1 Schannel
`
- WARNING gzip: not available
  - ADVICE:
    - spawn: gzip failed with exit code - and signal -. gzip is not executable
- OK tar: `bsdtar 3.5.2 - libarchive 3.5.2 zlib/1.2.5.f-ipp 
`
- OK pwsh: `7.3.4 Microsoft Windows 10.0.19045 Win32NT
`
- OK 7z: `7-Zip 21.04 beta (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-11-02
`

mason.nvim [Languages] ~
- WARNING Go: not available
  - ADVICE:
    - spawn: go failed with exit code - and signal -. go is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer.bat failed with exit code - and signal -. composer.bat is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- WARNING npm: not available
  - ADVICE:
    - spawn: npm.cmd failed with exit code - and signal -. npm.cmd is not executable
- WARNING node: not available
  - ADVICE:
    - spawn: node failed with exit code - and signal -. node is not executable
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- WARNING java: not available
  - ADVICE:
    - spawn: java failed with exit code - and signal -. java is not executable
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- WARNING python: not available
  - ADVICE:
    - spawn: python failed with exit code - and signal -. python is not executable
- WARNING pip: not available
  - ADVICE:
    - spawn: python failed with exit code - and signal -. python is not executable
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks 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.cmd failed with exit code - and signal -. gem.cmd is not executable
- OK cargo: `cargo 1.68.2 (6feb7c9cf 2023-03-26)`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 22. Remaining: 38. Limit: 60. Reset: 2023/4/19 22:40:12.
  Install and authenticate via gh-cli to increase rate limit.


### Screenshots

_No response_
lyh970817 commented 1 year ago

I can second this issue.