You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Installers: a server created when its binary is already installed keeps the template's command (and three test gaps from CodeRabbit) #2011
Two leftovers from CodeRabbit's reviews of PRs merged for 0.30.0, collected so they aren't lost. Neither is new in 0.30.0, and neither blocks it.
A server created when its binary is already installed keeps the template's command
CodeRabbit noted this on #1926 (cpp_ls), but every installer works this way. The 38 installers under src/main/resources/templates set the server's command (configureServer) only in the steps that run after a download, and none in their check. So when the check finds the server already installed (for example, when a language server is created again from its template, or a second one from the same template), the download is skipped, and the new language server keeps the template's command, such as cpp_ls. That works only if the binary is on the PATH.
Suggestion: also set the command when the check finds the server installed, without overwriting a command the user has changed.
The three test gaps are covered by #2033, merged into 0.30.2 as 13916a2. What is left here is the first part: a server created when its binary is already installed keeps the template's command.
@angelozerr a proposal for the rest of the first part, which needs your OK since it extends the installer.json format.
When the check of an installer finds the language server installed, the download doesn't run, and only the download gives the language server its command. So a language server created from the template once its binary is installed keeps the template's command. That concerns the templates whose check is fileExists and whose command isn't the installed path:
cpp_ls, docker-language-server and terraform-ls start a command on the PATH, which a user who hasn't run the installer can rely on (their installers don't run on start), so the template should keep it;
clangd (a folder named after its version), camel-lsp-server (a jar named after its version), ada_language_server, rust-analyzer and wgsl-analyzer (paths by architecture), and the debug adapters codelldb, perl-dap and vscode-js-debug have no fixed path for the template.
A check can already have an onSuccess, as every installer task can, so for a fixed path, a passing check can give the command today. What's missing is:
the file that fileExists found, for a check with a wildcard such as clangd's ${serverDist}/clangd*/bin/clangd, as a property, say ${check.file};
a configureServer that changes the command only while it is still the template's, so that a passing check, which also runs from Check installation in the settings, doesn't replace a command that the user changed.
Activity
test: cover the three test gaps that CodeRabbit found in #1924, #1938 …
lagergren commentedon Nov 20, 2026
The three test gaps are covered by #2033, merged into 0.30.2 as 13916a2. What is left here is the first part: a server created when its binary is already installed keeps the template's command.
lagergren commentedon Nov 20, 2026
@angelozerr a proposal for the rest of the first part, which needs your OK since it extends the
installer.jsonformat.When the check of an installer finds the language server installed, the download doesn't run, and only the download gives the language server its command. So a language server created from the template once its binary is installed keeps the template's command. That concerns the templates whose check is
fileExistsand whose command isn't the installed path:${BASE_DIR}/..., a placeholder: fix: start harper-ls, perl-lsp, clojure-lsp and jdtls where their installers put them #2041 points them at the installed path, as luau-lsp and lemminx do;A check can already have an
onSuccess, as every installer task can, so for a fixed path, a passing check can give the command today. What's missing is:fileExistsfound, for a check with a wildcard such as clangd's${serverDist}/clangd*/bin/clangd, as a property, say${check.file};configureServerthat changes the command only while it is still the template's, so that a passing check, which also runs from Check installation in the settings, doesn't replace a command that the user changed.clangd's check would then be:
and the same for the other templates above, with the schema and the docs of
installer.jsonupdated. Would that be OK?fix: start harper-ls, perl-lsp, clojure-lsp and jdtls where their ins…
fix: install perl-dap, erlang-ls and the Vue.js language server into …
fix: install perl-lsp and perl-dap where their checks and commands lo…
feat: a passing installer check gives the language server the command…