Skip to content

Installers: keep download versions current #1961

Open

Description

@muescha

Found while going through all templates for #1954; collected in #1943.

Summary

Most download installers look up the latest release, with "github" or "maven" in their installer.json, and have a fixed "url" next to it. DownloadTask.getDownloadUrl uses that url only when the lookup finds nothing:

if (downloadUrl == null) {
    context.print("Cannot retrieve url from 'github/asset', 'maven', fallback to the 'url' JSON property");
}

So normally the latest version is installed. But the lookup finds nothing more often than one would think, and then an old version gets installed, with only that line in the installer's output:

  • The GitHub API's rate limit: GitHubAssetFetcher asks api.github.com without a token, which allows 60 requests an hour per IP address; behind a company proxy, that's soon used up.
  • No access to the API, behind a proxy or firewall that lets github.com/…/releases/download through.
  • A renamed asset: the lookup only looks at the latest matching release; if a project renames its assets, the pattern stops matching, and every install falls back.

Where the versions are fixed

Template Lookup Fixed version
perl-lsp, perl-dap GitHub, latest release fallback v0.15.0
rust-analyzer GitHub, latest release fallback 2025-05-12
sysml-lsp GitHub, latest release fallback v0.9.1
vscode-js-debug GitHub, latest release fallback v1.100.1
camel-lsp-server Maven Central, latestVersion fallback 1.31.0
clangd GitHub, prereleases ("prerelease": true), i.e. the snapshots fallback snapshot_20250518; the one for macOS starts with a space (" https://…"), so it fails when it's needed (fixed in #1981)
terraform-ls none always 0.36.5, from releases.hashicorp.com
jdtls none jdt-language-server-latest.tar.gz, a snapshot
sdl-lsp none releases/latest/download/sdl-lsp.jar, always the latest without the API

The fallbacks were current when they were written, and get older with every release.

Ideas

  1. Let Renovate update the versions. LSP4IJ doesn't use Renovate or Dependabot yet. Renovate's regex managers can find versions in any file, such as v0.15.0 in a URL in installer.json, check them against GitHub releases or Maven Central, and open a PR when there's a newer one. Dependabot can't read versions from arbitrary JSON.
  2. A scheduled check, e.g. next to the existing nightly.yml: for each template, run the lookup and check that there's a matching asset for every system and architecture, that the fallback url still answers, and how far it's behind. That catches a renamed asset before users silently fall back.
  3. Say when the fallback is used, as a warning, not only a line in the output: "Couldn't look up the latest release of perl-lsp (GitHub's rate limit?), installed the fallback v0.15.0."
  4. A policy per template: "latest" (as most do today) or a tested, fixed version that Renovate keeps current. "Latest" can also break things when a server changes; a fixed version that's updated by PR is reproducible and still current. clangd's snapshots and terraform-ls's fixed version would then be choices that are written down.
  5. Show the installed version and when there's a newer one, e.g. "Update available" in the LSP Consoles. Today a newer version is only installed with Reinstall, and nothing says there is one. (The installed version could come from the download, or from serverInfo in the initialize response.)
  6. Avoid the API where possible: a project that publishes its assets without the version in the name can be downloaded from …/releases/latest/download/<asset>, without the API and its rate limit, as sdl-lsp does. For perl-lsp that doesn't work, since its asset names have the version.

Folders, ids and the other mismatches between templates are in #1960.

How this was checked

Claude Code read DownloadTask, GitHubAssetFetcher, MavenArtifactFetcher and all installer.json files at 42b4e25, and looked for a Renovate or Dependabot configuration in the repository (there's none). Nothing was downloaded, and the rate limit wasn't hit on purpose.

Activity

  1. lagergren commented on Nov 13, 2026

    @lagergren
    Collaborator

    0.30.0 fixes clangd's macOS fallback URL, which started with a space, in #1981. The fallback versions are as old as they were, and the ideas above are still open.

  2. muescha commented on Nov 13, 2026

    @muescha
    ContributorAuthor

    Two more installers whose GitHub downloads don't match the releases any more, found while going through #1981. The erlang-ls installer has the same problem, see #1991.

    For a github download, LSP4IJ looks only at the first 30 releases, takes the first one that matches "prerelease", and in it the first asset whose name contains the installer's asset name (GitHubAssetFetcher). If none matches, it falls back to the installer's url (DownloadTask).

    luau-lsp: the Linux x86_64 asset was renamed

    Installer looks for luau-lsp-linux.zip on Linux amd64 (installer.json L27)
    Up to 1.52.1 (July 2025) luau-lsp-linux.zip
    Since 1.53.0 (July 2025), up to 1.70.1 today luau-lsp-linux-x86_64.zip

    luau-lsp-linux.zip isn't part of luau-lsp-linux-x86_64.zip, so nothing matches, and the installer has no fallback url. So on Linux x86_64, it can't download luau-lsp at all. Linux arm64 (luau-lsp-linux-arm64.zip), macOS (luau-lsp-macos.zip) and Windows (luau-lsp-win64.zip) still match. The key amd64 is fine: LSP4IJ falls back to os.arch, which is amd64 there.

    sysml-lsp: works today, but only just

    Installer looks for a release that isn't a prerelease (installer.json L18), then e.g. sysml-lsp-linux-amd64.tar.gz (L19-L31)
    First page of releases today 7 nightly prereleases, then v0.12.1 from 6 November as 8th
    Found in v0.12.1 sysml-lsp-linux-amd64.tar.gz

    Open-MBEE/OpenSysML publishes a nightly prerelease almost every day. If there's no new release for about a month, the latest one drops off the first page, and the installer finds none. It then falls back to its url, which is v0.9.1 from September (L33-L45), so it installs an old version without saying so. Asking for /releases/latest when prereleases aren't wanted, or loading more releases per page, would avoid that for any repository with many prereleases.

    Since the name is matched as part of the asset name, sysml-lsp-linux-amd64.tar.gz also matches sysml-lsp-linux-amd64.tar.gz.spdx.json, which v0.12.1 has next to each archive. The archive comes first in the list, so it's the one downloaded. clojure-lsp's .zip.sha256 files are the same.

    How this was checked

    Claude Code matched the asset names of all installers that download from GitHub against the releases LSP4IJ loads, with the GitHub API and the same rules as GitHubAssetFetcher. Nothing was installed.

  3. muescha commented on Nov 21, 2026

    @muescha
    ContributorAuthor

    An update on the table above, as of today:

    Template Lookup Fixed version Latest
    lemminx (new since #1962) none always 0.31.2, from download.eclipse.org 0.31.2
    terraform-ls none always 0.36.5 0.39.1
    perl-lsp, perl-dap GitHub, latest release fallback v0.15.0 v0.17.0

    So lemminx is now a second template, next to terraform-ls, that always installs a fixed version, up to date today, but it will get older the same way. That makes ideas 1 and 2 above a bit more useful: for these two, the fixed version is all users ever get, not just a fallback.

    The perl-lsp v0.17.0 archives still have both perllsp and perl-dap, so updating the two fallbacks would only be the version number.

    Claude Code checked the installer.json files on main at b982bd4, the releases on releases.hashicorp.com, download.eclipse.org and GitHub, and the contents of the v0.17.0 archive for macOS arm64. Nothing was installed.

  4. lagergren commented on Nov 24, 2026

    @lagergren
    Collaborator

    main now has all three updates from the table above: luau-lsp downloads luau-lsp-linux-x86_64.zip on Linux x86_64 (#1993), terraform-ls installs 0.39.1, and perl-lsp and perl-dap fall back to v0.17.0 (#2083). lemminx is still fixed at 0.31.2, which is the latest today. Ideas 1 and 2 above are still open.

  5. added this to the Backlog milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementinstalltemplate-ls

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions