nobody-famous / alive

Common Lisp Extension for VSCode
The Unlicense
208 stars 20 forks source link

Can't start on MacOS #170

Open xixixao opened 1 year ago

xixixao commented 1 year ago

I have installed sbcl with homebrew, and I can launch it in all my shells and from VS Code's terminal. But Alive fails to start up with

Spawning child: sbcl
Spawned: sbcl
Failed to spawn sbcl: {"errno":-2,"code":"ENOENT","syscall":"spawn sbcl","path":"sbcl","spawnargs":["--eval","(require :asdf)","--eval","(asdf:load-system :alive-lsp)","--eval","(alive/server:start)"]}

Full log above for the initialization:

Get installed version: /Users/username/.vscode/extensions/rheller.alive-0.4.1/out/alive-lsp
Files: ["v0.2.4"]
Installed version: v0.2.4
LSP install path: /Users/username/.vscode/extensions/rheller.alive-0.4.1/out/alive-lsp/v0.2.4/nobody-famous-alive-lsp-f2b4f9c
Start LSP server
LSP config: {"install":{"path":""},"downloadUrl":"https://api.github.com/repos/nobody-famous/alive-lsp/releases","remote":{"host":null,"port":null},"startCommand":["sbcl","--eval","(require :asdf)","--eval","(asdf:load-system :alive-lsp)","--eval","(alive/server:start)"]}
Command: ["sbcl","--eval","(require :asdf)","--eval","(asdf:load-system :alive-lsp)","--eval","(alive/server:start)"]
ENV: {"COMMAND_MODE":"unix2003","HOME":"/Users/username","LOGNAME":"username","MallocNanoZone":"0","OLDPWD":"/","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","PATH":"/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin","PWD":"/","SHELL":"/bin/zsh","SHLVL":"0","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.ozNZttr8vj/Listeners","TMPDIR":"/var/folders/xd/fwxvgjwd1t90y2vvmcwyk5p40000gn/T/","USER":"username","VSCODE_AMD_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_CODE_CACHE_PATH":"/Users/username/Library/Application Support/Code/CachedData/fdb98833154679dbaa7af67a5a29fe19e55c2b73","VSCODE_CRASH_REPORTER_PROCESS_TYPE":"extensionHost","VSCODE_CWD":"/","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_IPC_HOOK":"/Users/username/Library/Application Support/Code/1.82-main.sock","VSCODE_NLS_CONFIG":"{\"locale\":\"en-us\",\"osLocale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}","VSCODE_PID":"74733","XPC_FLAGS":"0x0","XPC_SERVICE_NAME":"application.com.microsoft.VSCode.190888036.190888043","_":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron","__CFBundleIdentifier":"com.microsoft.VSCode","__CF_USER_TEXT_ENCODING":"0x1F5:0x0:0x0","ELECTRON_RUN_AS_NODE":"1","VSCODE_L10N_BUNDLE_LOCATION":"","CL_SOURCE_REGISTRY":"/Users/username/.vscode/extensions/rheller.alive-0.4.1/out/alive-lsp/v0.2.4/nobody-famous-alive-lsp-f2b4f9c:"}
CWD: /Users/username/Work/foo

I tried sbcl --eval '(require :asdf)' --eval '(asdf:load-system :alive-lsp)' --eval '(alive/server:start)' from a terminal but ofc I don't have alive-lsp in that case, so it fails.

nobody-famous commented 1 year ago

I'm not sure how Macs do things, but on Linux that behavior is usually from having the path set in a .bashrc file or something that gets loaded when a shell starts but not on login. Do you launch VSCode from inside a shell? If so, it should be picking up the shell's path settings.

xixixao commented 1 year ago

I do launch VSCode from the shell. Any other pointers / tests I should run? Like how can I tell what my PATH is in the environment the extension uses?