Skip to content

Commit

Permalink
Fix language server cannot start if Julia was installed via juliaup
Browse files Browse the repository at this point in the history
Disable the presence check of the Julia executable for now, because
shutil.which doesn't support symlinks on Python 3.3 on Windows.
  • Loading branch information
jwortmann committed Feb 6, 2023
1 parent 05db5ab commit ed87d97
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,15 @@ def server_version(cls) -> str:

@classmethod
def needs_update_or_installation(cls) -> bool:
if not shutil.which(cls.julia_exe()):
msg = ('The executable "{}" could not be found. Set up the path to the Julia executable by running the '
'command\n\n\tPreferences: LSP-julia Settings\n\nfrom the command palette.').format(cls.julia_exe())
raise RuntimeError(msg)
# The check for presence of the julia executable is disabled for now, because
# [`shutil.which`](https://docs.python.org/release/3.3.6/library/shutil.html#shutil.which) doesn't work with
# symlinks on Python 3.3 (on Windows at least), and if Julia was installed via juliaup it will create a symlink
# for it - see https://github.com/sublimelsp/LSP-julia/issues/24
#
# if not shutil.which(cls.julia_exe()):
# msg = ('The executable "{}" could not be found. Set up the path to the Julia executable by running the '
# 'command\n\n\tPreferences: LSP-julia Settings\n\nfrom the command palette.').format(cls.julia_exe())
# raise RuntimeError(msg)
try:
with open(cls.version_file(), "r") as fp:
return cls.server_version() != fp.read().strip()
Expand Down

0 comments on commit ed87d97

Please sign in to comment.