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.99k stars 281 forks source link

Recent jdtls (1.22.0) doesn't install on windows #1229

Closed Serranya closed 1 year ago

Serranya 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

The recent version (1.22.0) of jdtls does not install on windows. Other packages like java-debug-adapter, java-test or lua-language-server install just fine. Due to #1231 I was not able to test an older jdtls version. But I think I remember that an older version worked at some point.

Expected behavior

jdtls should install without error.

Affected packages

jdtls

Mason output

Failed
    ◍ jdtls
      ▼ Displaying full log
        Downloading file "https://download.eclipse.org/jdtls/milestones/1.22.0/jdt-language-server-1.22.0-202304131553.tar.gz"...
        x plugins/
        x features/
        x config_mac/
        x config_win/
        x config_linux/
        x config_ss_mac/
        x config_ss_win/
        x config_ss_linux/
        x bin/
        x plugins/ch.qos.logback.classic_1.2.11.jar
        x plugins/org.eclipse.jdt.junit.core_3.11.600.v20230209-1546.jar
        x plugins/org.eclipse.equinox.app_1.6.200.v20220720-2012.jar
        x plugins/org.eclipse.osgi.services_3.11.100.v20221006-1531.jar
        x plugins/org.eclipse.ltk.core.refactoring_3.13.100.v20230117-1625.jar
        x plugins/org.eclipse.equinox.simpleconfigurator_1.4.200.v20221111-1340.jar
        x plugins/org.eclipse.lsp4j.jsonrpc_0.20.0.v20230216-1815.jar
        x plugins/org.eclipse.xtext.xbase.lib_2.29.0.v20221121-0915.jar
        x plugins/org.hamcrest.core_1.3.0.v20180420-1519.jar
        x plugins/org.eclipse.jdt.junit.runtime_3.7.100.v20230115-0919.jar
        x plugins/org.apache.ant_1.10.12.v20211102-1452.jar
        x plugins/org.eclipse.osgi_3.18.300.v20230220-1352.jar
        x plugins/org.eclipse.equinox.common_3.17.100.v20230202-1341.jar
        x plugins/org.apache.commons.codec_1.14.0.v20221112-0806.jar
        x plugins/org.osgi.service.wireadmin_1.0.2.202109301733.jar
        x plugins/javax.annotation_1.3.5.v20221203-1659.jar
        x plugins/org.eclipse.jdt.core_3.33.0.v20230222-1748.jar
        x plugins/org.gradle.toolingapi_7.4.2.v20220712-0930-s.jar
        x plugins/org.osgi.service.device_1.1.1.202109301733.jar
        x plugins/org.osgi.service.provisioning_1.2.0.201505202024.jar
        x plugins/org.junit_4.13.2.v20211018-1956.jar
        x plugins/org.eclipse.compare.core_3.7.100.v20220812-1406.jar
        x plugins/org.eclipse.core.filesystem_1.9.500.v20220817-1539.jar
        x plugins/org.eclipse.core.jobs_3.13.300.v20230111-0823.jar
        x plugins/org.eclipse.jdt.core.compiler.batch_3.33.0.v20230218-1114.jar
        x plugins/org.eclipse.core.commands_3.10.400.v20230220-0932.jar
        x plugins/org.eclipse.core.net.linux_1.0.200.v20220812-1406.jar
        x plugins/org.eclipse.core.contenttype_3.8.200.v20220817-1539.jar
        x plugins/org.eclipse.buildship.core_3.1.7.v20221108-1729-s.jar
        x plugins/org.eclipse.m2e.apt.core_2.2.0.20230207-1039.jar
        x plugins/org.apache.commons.lang3_3.1.0.v201403281430.jar
        x plugins/org.eclipse.jdt.ls.core_1.22.0.202304131553.jar
        x plugins/com.google.guava_30.1.0.v20221112-0806.jar
        x plugins/ch.qos.logback.core_1.2.11.jar
        x plugins/org.osgi.service.upnp_1.2.1.202109301733.jar
        x plugins/org.osgi.util.promise_1.3.0.202212101352.jar
        x plugins/org.eclipse.core.filebuffers_3.7.200.v20220202-1008.jar
        x plugins/org.eclipse.text_3.12.300.v20220921-1010.jar
        x plugins/org.eclipse.m2e.maven.runtime_3.9.100.20230329-2139.jar
        x plugins/org.eclipse.core.resources_3.18.200.v20230209-0754.jar
        x plugins/org.eclipse.debug.core_3.20.100.v20230124-1239.jar
        x plugins/org.eclipse.core.runtime_3.26.100.v20221021-0005.jar
        x plugins/org.eclipse.m2e.jdt_2.0.6.20230324-1533.jar
        x plugins/org.eclipse.m2e.core_2.0.8.20230329-2139.jar
        x plugins/org.eclipse.jdt.launching_3.19.900.v20230209-1222.jar
        x plugins/org.eclipse.core.net_1.4.0.v20220813-1037.jar
        x plugins/org.eclipse.equinox.frameworkadmin.equinox_1.2.200.v20220315-2155.jar
        x plugins/org.osgi.service.useradmin_1.1.1.202109301733.jar
        x plugins/org.osgi.service.prefs_1.1.2.202109301733.jar
        x plugins/org.osgi.util.function_1.2.0.202109301733.jar
        x plugins/org.osgi.service.event_1.4.1.202109301733.jar
        x plugins/slf4j.api_1.7.36.jar
        x plugins/org.eclipse.core.expressions_3.8.200.v20220613-1047.jar
        x plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
        x plugins/javax.inject_1.0.0.v20220405-0441.jar
        x plugins/org.eclipse.jdt.ls.logback.appender_1.22.0.202304131553.jar
        x plugins/org.eclipse.core.variables_3.5.100.v20210721-1355.jar
        x plugins/org.osgi.service.metatype_1.4.1.202109301733.jar
        x plugins/com.sun.jna_5.13.0.jar
        x plugins/org.apache.commons.cli_1.4.0.v20221112-0806.jar
        x plugins/org.eclipse.lsp4j_0.20.0.v20230216-1815.jar
        x plugins/com.google.gson_2.10.1.v20230109-0753.jar
        x plugins/org.eclipse.equinox.frameworkadmin_2.2.100.v20220817-1208.jar
        x plugins/org.eclipse.jdt.apt.pluggable.core_1.3.100.v20221201-1549.jar
        x plugins/org.eclipse.m2e.workspace.cli_0.3.1.jar
        x plugins/org.eclipse.equinox.security_1.3.1000.v20220801-1135.jar
        x plugins/com.sun.jna.platform_5.13.0.jar
        x plugins/org.eclipse.equinox.preferences_3.10.200.v20230120-0604.jar
        x plugins/org.eclipse.equinox.security.linux_1.0.300.v20220904-1118.jar
        x plugins/org.eclipse.jdt.apt.core_3.7.100.v20221202-1820.jar
        x plugins/org.eclipse.jdt.core.manipulation_1.18.0.v20230209-2203.jar
        x plugins/org.eclipse.jdt.ls.filesystem_1.22.0.202304131553.jar
        x plugins/org.eclipse.osgi.compatibility.state_1.2.800.v20221116-1440.jar
        x plugins/org.eclipse.equinox.simpleconfigurator.manipulator_2.2.100.v20221117-1044.jar
        x plugins/org.eclipse.ant.core_3.6.500.v20220718-1722.jar
        x plugins/org.osgi.service.component_1.5.1.202212101352.jar
        x plugins/org.eclipse.equinox.registry_3.11.200.v20220817-1601.jar
        x plugins/org.eclipse.buildship.compat_3.1.7.v20221108-1729-s.jar
        x plugins/org.osgi.service.cm_1.6.1.202109301733.jar
        x plugins/org.eclipse.jdt.debug_3.20.100.v20230119-1127.jar
        x plugins/org.apache.felix.scr_2.2.6.jar
        x plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.700.v20221108-1024.jar
        x plugins/org.eclipse.equinox.security.win32.x86_64_1.1.300.v20211021-1418.jar
        x plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.700.v20221108-1024.jar
        x plugins/org.eclipse.core.net.win32_1.0.100.v20220812-1406.jar
        x plugins/org.eclipse.core.net.win32.x86_64_1.1.700.v20220812-1406.jar
        x plugins/org.eclipse.jdt.launching.macosx_3.5.100.v20220927-0854.jar
        x plugins/org.eclipse.equinox.security.macosx_1.101.400.v20210427-1958.jar
        x plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.2.700.v20221108-1024.jar
        x features/org.eclipse.equinox.executable_3.8.2000.v20221201-0912.jar
        x config_mac/config.ini
        x config_win/config.ini
        x config_linux/config.ini
        x config_ss_mac/config.ini
        x config_ss_win/config.ini
        x config_ss_linux/config.ini
        x bin/jdtls
        x bin/jdtls.py
        Downloading file "https://projectlombok.org/downloads/lombok.jar"...
        EPERM: operation not permitted: C:\Users\peter.lamby\AppData\Local\nvim-data\mason\packages\jdtls\plugins\org.eclipse.equinox.security.linux_1.0.300.v20220904-1118.jar -> C:\Users\peter.lamby\AppData\Local\nvim-data\mason\share\jdtls/plugins\org.eclipse.equinox.security.linux_1.0.300.v20220904-1118.jar

Installation log

[INFO  18.04.2023 10:55:31] ...m-data/lazy/mason.nvim/lua/mason-core/installer/init.lua:166: Executing installer for Package(name=jdtls) {}
[DEBUG 18.04.2023 10:55:31] ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:71: fs: mkdirp C:\Users\peter.lamby\AppData\Local\nvim-data\mason\.packages\jdtls
[DEBUG 18.04.2023 10:55:31] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:142: Compiling installer. jdtls {}
[DEBUG 18.04.2023 10:55:31] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:106: Parsing spec jdtls {}
[DEBUG 18.04.2023 10:55:31] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:95: std: downloading file "https://download.eclipse.org/jdtls/milestones/1.22.0/jdt-language-server-1.22.0-202304131553.tar.gz"
[DEBUG 18.04.2023 10:55:31] ...Local/nvim-data/lazy/mason.nvim/lua/mason-core/fetch.lua:34: Fetching URL "https://download.eclipse.org/jdtls/milestones/1.22.0/jdt-language-server-1.22.0-202304131553.tar.gz"
[DEBUG 18.04.2023 10:55:31] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="curl", spawn_opts={
  args = { "-H", "User-Agent: mason.nvim (+https://github.com/williamboman/mason.nvim)", "-fsSL", "-X", "GET", "-o", "C:\\Users\\peter.lamby\\AppData\\Local\\nvim-data\\mason\\.packages\\jdtls\\jdtls.tar.gz", "https://download.eclipse.org/jdtls/milestones/1.22.0/jdt-language-server-1.22.0-202304131553.tar.gz" }
}
[DEBUG 18.04.2023 10:55:31] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 23812
[DEBUG 18.04.2023 10:56:01] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=23812 exited with exit_code=0, signal=0
[DEBUG 18.04.2023 10:56:01] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:232: std: unpack "jdtls.tar.gz"
[DEBUG 18.04.2023 10:56:01] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:109: std: untar "jdtls.tar.gz"
[DEBUG 18.04.2023 10:56:01] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="tar", spawn_opts={
  args = { "--no-same-owner", "-xvf", "jdtls.tar.gz" },
  cwd = "C:\\Users\\peter.lamby\\AppData\\Local\\nvim-data\\mason\\.packages\\jdtls"
}
[DEBUG 18.04.2023 10:56:01] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 6640
[DEBUG 18.04.2023 10:56:02] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=6640 exited with exit_code=0, signal=0
[DEBUG 18.04.2023 10:56:02] ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink C:\Users\peter.lamby\AppData\Local\nvim-data\mason\.packages\jdtls\jdtls.tar.gz
[DEBUG 18.04.2023 10:56:02] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:95: std: downloading file "https://projectlombok.org/downloads/lombok.jar"
[DEBUG 18.04.2023 10:56:02] ...Local/nvim-data/lazy/mason.nvim/lua/mason-core/fetch.lua:34: Fetching URL "https://projectlombok.org/downloads/lombok.jar"
[DEBUG 18.04.2023 10:56:02] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="curl", spawn_opts={
  args = { "-H", "User-Agent: mason.nvim (+https://github.com/williamboman/mason.nvim)", "-fsSL", "-X", "GET", "-o", "C:\\Users\\peter.lamby\\AppData\\Local\\nvim-data\\mason\\.packages\\jdtls\\lombok.jar", "https://projectlombok.org/downloads/lombok.jar" }
}
[DEBUG 18.04.2023 10:56:02] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 22132
[DEBUG 18.04.2023 10:56:04] ...cal/nvim-data/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=22132 exited with exit_code=0, signal=0
[DEBUG 18.04.2023 10:56:04] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:232: std: unpack "lombok.jar"
[DEBUG 18.04.2023 10:56:04] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:150: Registering bin links Package(name=jdtls) {
  jdtls = "python:bin/jdtls"
}
[DEBUG 18.04.2023 10:56:04] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:174: Expanded bin link "jdtls" -> "jdtls.cmd"
[DEBUG 18.04.2023 10:56:04] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:198: Registering symlinks Package(name=jdtls) {
  ["jdtls/config/"] = "{{source.download.config}}",
  ["jdtls/lombok.jar"] = "lombok.jar",
  ["jdtls/plugins/"] = "plugins/",
  ["jdtls/plugins/org.eclipse.equinox.launcher.jar"] = "plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar"
}
[DEBUG 18.04.2023 10:56:04] ...ata/lazy/mason.nvim/lua/mason-core/installer/context.lua:212: Promoting cwd "C:\\Users\\peter.lamby\\AppData\\Local\\nvim-data\\mason\\.packages\\jdtls" to "C:\\Users\\peter.lamby\\AppData\\Local\\nvim-data\\mason\\packages\\jdtls"
[DEBUG 18.04.2023 10:56:04] ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:84: fs: rename C:\Users\peter.lamby\AppData\Local\nvim-data\mason\.packages\jdtls C:\Users\peter.lamby\AppData\Local\nvim-data\mason\packages\jdtls
[DEBUG 18.04.2023 10:56:04] ...data/lazy/mason.nvim/lua/mason-core/installer/linker.lua:129: Linking Package(name=jdtls)
[ERROR 18.04.2023 10:56:04] ...m-data/lazy/mason.nvim/lua/mason-core/installer/init.lua:200: Installation failed for Package(name=jdtls) error="EPERM: operation not permitted: C:\\Users\\peter.lamby\\AppData\\Local\\nvim-data\\mason\\packages\\jdtls\\plugins\\ch.qos.logback.classic_1.2.11.jar -> C:\\Users\\peter.lamby\\AppData\\Local\\nvim-data\\mason\\share\\jdtls/plugins\\ch.qos.logback.classic_1.2.11.jar"
[DEBUG 18.04.2023 10:56:04] ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf C:\Users\peter.lamby\AppData\Local\nvim-data\mason\packages\jdtls
[DEBUG 18.04.2023 10:56:04] ...m-data/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=jdtls)
[DEBUG 18.04.2023 10:56:04] ...data/lazy/mason.nvim/lua/mason-core/installer/linker.lua:42: Unlinking Package(name=jdtls)
[DEBUG 18.04.2023 10:56:04] ...ta/Local/nvim-data/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink C:\Users\peter.lamby\AppData\Local\nvim-data\mason\bin\jdtls.cmd

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 -DINCLUDE_GENERATED_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-Datei: "$VIM\sysinit.vim"
     Voreinstellung für $VIM: "C:/Program Files (x86)/nvim/share/nvim"

Run :checkhealth for more info

Operating system/version

Windows

Healthcheck

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-18-gray-panda` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 5.42 of 14 January 2001, by Info-ZIP.  Maintained by C. Spieler.  Send
`
- OK wget: `GNU Wget 1.8.2
`
- OK curl: `curl 8.0.1 (Windows) libcurl/8.0.1 Schannel WinIDN
`
- OK gzip: `Ok`
- OK tar: `bsdtar 3.5.2 - libarchive 3.5.2 zlib/1.2.5.f-ipp 
`
- ERROR pwsh: not available
  - ADVICE:
    - spawn: pwsh failed with exit code - and signal -. pwsh is not executable
- WARNING 7z: not available
  - ADVICE:
    - spawn: 7z failed with exit code - and signal -. 7z is not executable

mason.nvim [Languages] ~
- WARNING Go: not available
  - ADVICE:
    - spawn: go failed with exit code - and signal -. go 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
- 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
- OK node: `v16.13.2
`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK cargo: `cargo 1.66.1 (ad779e08b 2023-01-10)`
- OK python: `Python 3.8.6
`
- OK javac: `javac 17.0.6
`
- OK java: `openjdk version "17.0.6" 2023-01-17
`
- OK JAVA_HOME: `openjdk version "11.0.18" 2023-01-17
`
- OK pip: `pip 20.2.1 from C:\Users\peter.lamby\AppData\Local\Programs\Python\Python38\lib\site-packages\pip (python 3.8)

`
- OK npm: `8.19.2`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 3. Remaining: 57. Limit: 60. Reset: 18.04.2023 11:19:58.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots

No response

williamboman commented 1 year ago

Hey, should be fixed in https://github.com/williamboman/mason.nvim/pull/1253. Try pulling latest plugin version.

Serranya commented 1 year ago

I can confirm that I can now install jdtls again :)