LSP-julia icon indicating copy to clipboard operation
LSP-julia copied to clipboard

Server stuck at initializing in default env with juliaup and outdated version

Open jwortmann opened this issue 1 year ago • 0 comments

If Julia was installed with juliaup and the Julia version is outdated, the language server might be stuck with an (initializing) message in the status bar, if the opened file doesn't belong to a project environment.

This happens because currently the name of the default Julia environment (e.g. @v1.11) is obtained by parsing the output of julia --version:

https://github.com/sublimelsp/LSP-julia/blob/e3b3ed62dd6377e82b6f9b75efda6c93a5a57c43/plugin.py#L648-L650

But if the version is outdated, juliaup prepends a message like

The latest version of Julia in the `release` channel is 1.11.2+0.x64.w64.mingw32. You currently have `1.11.1+0.x64.w64.mingw32` installed. Run:

  juliaup update

in your terminal shell to install Julia 1.11.2+0.x64.w64.mingw32 and update the `release` channel to that version.

and obviously trying to parse that output fails.

We should either add code to handle that update message or instead obtain the default environment name from searching in the .julia/environments folder in the file system.

Workaround for now is to update Julia to the latest available version, to prevent the update message.

jwortmann avatar Dec 24 '24 12:12 jwortmann