Skip to content

Commit

Permalink
fix: Add the (now required) SSI exe and version arguments to the Lang…
Browse files Browse the repository at this point in the history
…uageServer (#9)

* add SSI exe and version arguments

The language server now requires 10 arguments, with the last two being
the Julia exe and version number used to run the SSI. This just uses the
same julia version, but makes the LSP happy

* add SSI exe and version arugments (for windows cmd)

---------

Co-authored-by: sandyspiers <[email protected]>
  • Loading branch information
sandyspiers and sandyspiers authored Jul 16, 2024
1 parent c8a8f7e commit f3e3fd6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bin/julia-lsp
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ export JULIA_LOAD_PATH=":"
export JULIA_DEPOT_PATH="${PKG_ROOT}/store/lsdepot/v1"

: ${JULIA_LSP_JULIA_BIN:=julia}
exec "$JULIA_LSP_JULIA_BIN" --startup-file=no --history-file=no --depwarn=no "${PKG_ROOT}/extension/scripts/languageserver/main.jl" "$JULIA_ENVIRONMENT_PATH" "$DEBUG" "$IGNORE_TELEMETRY_CRASH" "$OLD_DEPOT_PATH" "$STORAGE_PATH" "$USE_SYMSERVER_DOWNLOADS" "$SYMSERVER_UPSTREAM" "$DETACHED"
export JULIA_SSI_EXE="$JULIA_LSP_JULIA_BIN"
export JULIA_SSI_VERSION="$(exec ${JULIA_SSI_EXE} --version | awk '{print $3}')"

exec "$JULIA_LSP_JULIA_BIN" --startup-file=no --history-file=no --depwarn=no "${PKG_ROOT}/extension/scripts/languageserver/main.jl" "$JULIA_ENVIRONMENT_PATH" "$DEBUG" "$IGNORE_TELEMETRY_CRASH" "$OLD_DEPOT_PATH" "$STORAGE_PATH" "$USE_SYMSERVER_DOWNLOADS" "$SYMSERVER_UPSTREAM" "$DETACHED" "$JULIA_SSI_EXE" "$JULIA_SSI_VERSION"
7 changes: 6 additions & 1 deletion bin/julia-lsp.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ IF "%JULIA_LSP_JULIA_BIN%"=="" (
set "JULIA_LSP_JULIA_BIN=julia"
)

set "JULIA_SSI_EXE=%JULIA_LSP_JULIA_BIN%"
for /f "tokens=3" %%v in ('%JULIA_SSI_EXE% --version') do (
set JULIA_SSI_VERSION=%%v
)

set "DETACHED=--detached=no"
set "JULIA_LOAD_PATH=;"
set "JULIA_DEPOT_PATH=%PKG_ROOT%\store\lsdepot\v1"

"%JULIA_LSP_JULIA_BIN%" --startup-file=no --history-file=no --depwarn=no "%PKG_ROOT%\extension\scripts\languageserver\main.jl" "%JULIA_ENVIRONMENT_PATH%" "%DEBUG%" "%IGNORE_TELEMETRY_CRASH%" "%OLD_DEPOT_PATH%" "%STORAGE_PATH%" "%USE_SYMSERVER_DOWNLOADS%" "%SYMSERVER_UPSTREAM%" "%DETACHED%"
"%JULIA_LSP_JULIA_BIN%" --startup-file=no --history-file=no --depwarn=no "%PKG_ROOT%\extension\scripts\languageserver\main.jl" "%JULIA_ENVIRONMENT_PATH%" "%DEBUG%" "%IGNORE_TELEMETRY_CRASH%" "%OLD_DEPOT_PATH%" "%STORAGE_PATH%" "%USE_SYMSERVER_DOWNLOADS%" "%SYMSERVER_UPSTREAM%" "%DETACHED%" "%JULIA_SSI_EXE%" "%JULIA_SSI_VERSION%"

0 comments on commit f3e3fd6

Please sign in to comment.