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 & jdtls] Install older versions of packages #1661

Open
gbroques opened this issue Mar 22, 2024 · 0 comments
Open

[java-debug-adapter & jdtls] Install older versions of packages #1661

gbroques opened this issue Mar 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@gbroques
Copy link

gbroques commented Mar 22, 2024

I'm trying to install an older version of java-debug-adapter with the following command:

:MasonInstall java-debug-adapter@0.46.0

However, I see the following error due to com.microsoft.java.debug.plugin-0.50.0.jar not existing in that older version:

    ◍ java-debug-adapter
      ▼ Displaying full log
        Fetching available versions…
        Downloading file "https://open-vsx.org/api/vscjava/vscode-java-debug/0.46.0/file/vscjava.vscode-java-debug-0.46.0.vsix"…
        Unpacking "vscjava.vscode-java-debug-0.46.0.vsix"…
        Link target "C:\\Users\\gbroques\\AppData\\Local\\nvim-data\\mason\\packages\\java-debug-adapter\\extension/server/com.microsoft.java.debug.plugin-0.50.0.jar" does not exist.

Is there a way to override the com.microsoft.java.debug.plugin-0.50.0.jar with com.microsoft.java.debug.plugin-0.42.0.jar which is the version java-debug-adapter@0.46.0 contains?

Another idea is to look for any version with a glob pattern such as com.microsoft.java.debug.plugin-*.jar.


jdtls has a similar limitation due to the download URL containing a timestamp, 202402151717, and the versioned share dependency.

:MasonInstall jdtls@v1.24.0
    ◍ jdtls
      ▼ Displaying full log
        Fetching available versions…
        Downloading file "https://download.eclipse.org/jdtls/milestones/1.24.0/jdt-language-server-1.24.0-202402151717.tar.gz"…
        spawn: powershell failed with exit code 1 and signal 0. iwr : The remote server returned an error: (404) Not Found.
        At line:1 char:160
        + ... pe]::Tls12; iwr -Headers @{"User-Agent"="mason.nvim v1.10.0 (+https:/ ...
        +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc 
           eption
            + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
         

        Failed to download file "https://download.eclipse.org/jdtls/milestones/1.24.0/jdt-language-server-1.24.0-202402151717.tar.gz".

The correct download URL for 1.24.0 is:
https://www.eclipse.org/downloads/download.php?file=/jdtls/milestones/1.24.0/jdt-language-server-1.24.0-202306011728.tar.gz


Related Issues:

Related Discussions:

@gbroques gbroques added the enhancement New feature or request label Mar 22, 2024
@williambotman williambotman added this to Needs triage in Issue Triaging Mar 22, 2024
@gbroques gbroques changed the title [java-debug-adapter] Override share version of com.microsoft.java.debug.plugin.jar [java-debug-adapter] Install older version of package Mar 22, 2024
@gbroques gbroques changed the title [java-debug-adapter] Install older version of package [java-debug-adapter & jdtls] Install older versions of packages Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Issue Triaging
Needs triage
Development

No branches or pull requests

1 participant