lexical-lsp / vscode-lexical

VSCode extension for Lexical, the modern Elixir language server
Apache License 2.0
36 stars 6 forks source link

Lexical fails to start if the path to its executables has a space #42

Closed scohen closed 1 year ago

scohen commented 1 year ago

OS: MacOS 13.4.1 Lexical Version: 0.3.0

When starting, lexical downloaded the precompiled package into ~/Library/Application Support/... but it failed to start with the following messages:

Starting lexical release in "/Users/<redacted>/Library/Application Support/Code/User/globalStorage/lexical-lsp.lexical/lexical_install/lexical/bin/start_lexical.sh"
find: /Users/<redacted>/Library/Application: No such file or directory
find: Support/Code/User/globalStorage/lexical-lsp.lexical/lexical_install/lexical/bin/../lib: No such file or directory
** (UndefinedFunctionError) function LXical.Server.Boot.start/0 is undefined (module LXical.Server.Boot is not available)
    LXical.Server.Boot.start()
    nofile:1: (file)
    (stdlib 4.3.1.1) erl_eval.erl:748: :erl_eval.do_apply/7
    (elixir 1.14.5) lib/code.ex:425: Code.validated_eval_string/3
[Error - 3:10:34 PM] Server initialization failed.

The output from find seems like it's splitting on the space in Application Support for some reason.

Blond11516 commented 1 year ago

This turned out to be a bug in lexical's boot script rather than the extension. Fixed in https://github.com/lexical-lsp/lexical/pull/345.