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

Improve automatic JDT LS installation #15

Closed
doublep opened this issue Oct 28, 2023 · 0 comments
Closed

Improve automatic JDT LS installation #15

doublep opened this issue Oct 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@doublep
Copy link

doublep commented Oct 28, 2023

Problem

Default value of eglot-java-eclipse-jdt-ls-download-url is a snapshot download. If you are unlucky to install it a time when the latest snapshot is buggy, good luck understanding what's wrong when you are not familiar with eglot.

Potential solution

Switching from release snapshots to release milestones could mitigate this issue.

Sadly, it seems that there's no official Eclipse website API endpoint to retrieve available jdtls releases. (i.e., in comparison to let's say fetching GitHub releases for a given project).

Approach

One option is to leverage the Homebrew jdtls formula REST endpoint to retrieve the latest "known" stable version.

The property paths of interest are .urls.stable.url and .versions.stable, per JSON response exceprt below.

Toggle JSON response exceprt
{
  "name": "jdtls",
  ...
  "versions": {
    "stable": "1.30.0",
    "head": null,
    "bottle": true
  },
  "urls": {
    "stable": {
      "url": "https://www.eclipse.org/downloads/download.php?file=/jdtls/milestones/1.30.0/jdt-language-server-1.30.0-202311301503.tar.gz",
      "tag": null,
      "revision": null,
      "using": null,
      "checksum": "579809f27df5f4e53566217f7273fa25cd45a22d3870c0aafd4f84cdd4c97acd"
    }
  },
  ...
}

Other considerations

We probably need to record the installed jdtls version ( in some form of metadata file??).

Caveats

  • The jdtls version recorded in the Homebrew formula might not be the latest available release milestone.
  • A relase milestone is usually more stable than a release snaphsot, but the milestone could be buggy as well...
@yveszoundi yveszoundi added the enhancement New feature or request label Dec 8, 2023
yveszoundi added a commit that referenced this issue Dec 8, 2023
- Use homebrew jdtls formula for download metadata
- Track the installed jdtls version locally
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
None yet
Development

No branches or pull requests

2 participants