grafana / vscode-jsonnet

Full code support (formatting, highlighting, navigation, etc) for Jsonnet
Apache License 2.0
65 stars 7 forks source link

Auto-Update does not work for darwin-arm64 (M1/M2 macs) #3

Open ofsaleem opened 2 years ago

ofsaleem commented 2 years ago

vscode auto updated the binary to 0.6.4, but the server no longer runs. and since it cant run, even with --version, it cant check the versions, so it asks to auto-update again, and the process repeats

vscode output:

Not using custom binary path. Using default path
Binary path is /Users/omar/Library/Application Support/Code/User/globalStorage/julienduchesne.vscode-jsonnet/bin/jsonnet-language-server (exists: true)
Auto-update is enabled. Fetching latest release from https://api.github.com/repos/grafana/jsonnet-language-server/releases/latest
Latest release is 0.6.4
Failed to get current version from /Users/omar/Library/Application Support/Code/User/globalStorage/julienduchesne.vscode-jsonnet/bin/jsonnet-language-server
Error: Command failed: /Users/omar/Library/Application Support/Code/User/globalStorage/julienduchesne.vscode-jsonnet/bin/jsonnet-language-server --version

however the same binary works if its in ~/go/bin/

 ~/go/bin $ ./jsonnet-language-server --version 
jsonnet-language-server version 0.6.4
 ~/L/Application Su/Co/U/g/j/bin $ ./jsonnet-language-server --version
[1]    93390 killed     ./jsonnet-language-server

im using the darwin-arm64 binary. after auto-update failed, i downloaded it manually from github and moved it into my go/bin folder, then after confirming it worked via command line, copied it to the binary path given in the vscode output above

zzehring commented 2 years ago

+1 on this issue for darwin-arm64 (M1) binary. We had experienced this issue during development as well, so definitely not a new issue.

For posterity, a workaround is to:

ofsaleem commented 1 year ago

this happened again with 0.7.2, i was following zack's instructions but I also had to run sudo xattr -d com.apple.quarantine /path/to/language/server to be able to use it

jacksongoode commented 1 year ago

Even all of the above steps were unable to resolve the issue (M1 Pro).

[Error - 4:14:39 PM] Jsonnet Language Server client: couldn't create connection to server.
Launching server using command /Users/jackson/.vscode-oss/extensions/grafana.vscode-jsonnet-0.3.1/vscode-jsonnet-0.3.1.vsix failed. Error: spawn /Users/jackson/.vscode-oss/extensions/grafana.vscode-jsonnet-0.3.1/vscode-jsonnet-0.3.1.vsix EACCES
[Error - 4:14:39 PM] Sending notification workspace/didChangeConfiguration failed.
Launching server using command /Users/jackson/.vscode-oss/extensions/grafana.vscode-jsonnet-0.3.1/vscode-jsonnet-0.3.1.vsix failed. Error: spawn /Users/jackson/.vscode-oss/extensions/grafana.vscode-jsonnet-0.3.1/vscode-jsonnet-0.3.1.vsix EACCES
vitalyu commented 1 year ago

Even all of the above steps were unable to resolve the issue (M1 Pro).

[Error - 4:14:39 PM] Jsonnet Language Server client: couldn't create connection to server.
Launching server using command /Users/jackson/.vscode-oss/extensions/grafana.vscode-jsonnet-0.3.1/vscode-jsonnet-0.3.1.vsix failed. Error: spawn /Users/jackson/.vscode-oss/extensions/grafana.vscode-jsonnet-0.3.1/vscode-jsonnet-0.3.1.vsix EACCES
[Error - 4:14:39 PM] Sending notification workspace/didChangeConfiguration failed.
Launching server using command /Users/jackson/.vscode-oss/extensions/grafana.vscode-jsonnet-0.3.1/vscode-jsonnet-0.3.1.vsix failed. Error: spawn /Users/jackson/.vscode-oss/extensions/grafana.vscode-jsonnet-0.3.1/vscode-jsonnet-0.3.1.vsix EACCES

You should grand execute access to binary, eg: chmod +x ./jsonnet-language-server_0.12.1_linux_arm64