Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java-debug-adapter downloads incorrect version and causes link error #1845

Open
3 tasks done
glaulher opened this issue Dec 24, 2024 · 1 comment
Open
3 tasks done

Comments

@glaulher
Copy link

I've searched open issues for similar requests

  • Yes

I've manually reviewed logs to find potential errors

  • Yes

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

  • Yes

Problem description

When installing the java-debug-adapter package using mason.nvim, it downloads version (0.58.0) This results in a broken symlink and missing files (com.microsoft.java.debug.plugin-0.53.1.jar) , making the package unusable.

I believe this issue is related to how mason.nvim handles version resolution or interactions with dependencies like jdtls. A fix or clarification on how to manage and lock specific versions of java-debug-adapter would resolve this issue. If I force it to another version, Mason opens when starting nvim and tries to change the version to 0.58.0.

Expected behavior

The java-debug-adapter package must download and install the specified version (0.58.0) as configured. All required files, including com.microsoft.java.debug.plugin-0.53.0.jar, must be present and the package must be functional with no broken symbolic links or missing dependencies. It could allow keeping 0.58.1 which has 0.53.1.jar, which even installs, but is uninstalled when restarting nvim.

Steps to reproduce

I use nvim kickstart with instructions from the nvim-java project, and mason's jdtls.

Affected packages

jdtls

Neovim version (>= 0.7)

NVIM v0.10.2
Build type: RelWithDebInfo
LuaJIT 2.1.1731601260

Operating system/version

Linux localhost.localdomain 6.11.8-1-default #1 SMP PREEMPT_DYNAMIC Thu Nov 14 12:54:01 UTC 2024 (099023b) x86_64 x86_64 x86_64 GNU/Linux

Healthcheck

==============================================================================
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/nvim-java/mason-registry version: 2024-10-23-charming-cut` is installed.
- OK Registry `github.com/mason-org/mason-registry version: 2024-12-23-macho-liar` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send`
- OK wget: `GNU Wget 1.25.0 construído em linux-gnu.`
- OK curl: `curl 8.11.0 (x86_64-suse-linux-gnu) libcurl/8.11.0 OpenSSL/3.2.3 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh/0.11.1/openssl/zlib nghttp2/1.64.0 OpenLDAP/2.6.8`
- OK gzip: `gzip 1.13`
- OK tar: `tar (GNU tar) 1.35`
- OK bash: `GNU bash, versão 5.2.37(1)-release (x86_64-suse-linux)`
- OK sh: `Ok`

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 failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- OK Ruby: `ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux-gnu]`
- OK node: `v22.11.0`
- OK npm: `10.9.2`
- OK cargo: `cargo 1.83.0 (5ffbef321 2024-10-29)`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK python: `Python 3.11.11`
- OK JAVA_HOME: `openjdk version "21.0.5" 2024-10-15`
- OK luarocks: `/usr/bin/luarocks 3.11.0`
- OK javac: `javac 21.0.5`
- OK java: `openjdk version "17.0.2" 2022-01-18`
- OK RubyGem: `3.5.22`
- OK pip: `pip 24.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: seg 23 dez 2024 22:21:52.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots or recordings

image
image

@glaulher
Copy link
Author

I discovered that version 0.58.0 is set in the nvim-java plugin, but for some reason mason when creating the link looks for java.debug.plugin-0.53.1.jar and version 0.58.0 loads java.debug. plugin-0.53.0.jar, below is the nvim-java file that sets the versions:
https://github.com/nvim-java/nvim-java/blob/main/lua/java/startup/mason-dep.lua#L52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant