Skip to content

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

Open
@jwortmann

Description

@jwortmann

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:

LSP-julia/plugin.py

Lines 648 to 650 in e3b3ed6

def julia_version(cls) -> str:
return subprocess.check_output(
[cls.julia_exe(), "--version"], startupinfo=startupinfo()).decode("utf-8").rstrip().split()[-1]

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions