Can't find bundled superbol-free executable on darwin-arm64
A bit of an experience report: I successfully compiled the VS Code extension on ARM Mac OS using Nix. However, the extension did not work when installed because it couldn't find the LSP executable.
The reason seems to be that the LSP executable was named superbol-free-linux-x64, but the extension couldn't find it under that name even though it was in the correct _dist directory.
Workaround: The file should renamed from $HOME/.vscode/extensions/ocamlpro.superbol-0.1.5/_dist/superbol-free-linux-x64 to $HOME/.vscode/extensions/ocamlpro.superbol-0.1.5/_dist/superbol-free. After that, things work fine.
Relatedly, the VSIX file generated by the build process also ends up being called superbol-vscode-platform-0.1.5-linux-x64.vsix for some reason.
I found the workaround after looking at
https://github.com/OCamlPro/superbol-studio-oss/blob/922588f906f27c6a26f7e0298d7851a529fb6dc5/src/vscode/superbol-vscode-platform/superbol_languageclient.ml#L43-L54
Hope this helps, and thanks for making this extension!
Aside: To emphasize, the LSP executable that was built was in fact a darwin-arm64 executable despite the name:
$ file superbol-free-linux-x64
superbol-free-linux-x64: Mach-O 64-bit executable arm64
@nberth Isn't that fixed by bba8516?
I don't believe this is fixed. I'm pretty sure experienced this problem on master after bba8516610e476864881d457e4299b0a0bf65803.
Moreover, I just tried out the "Universal" binaries generated in https://github.com/OCamlPro/superbol-studio-oss/commit/4f607a9c1520bbc816a5454f4231fc912fdba0ba, specifically https://github.com/OCamlPro/superbol-studio-oss/actions/runs/13897057999/artifacts/2763671785 from https://github.com/OCamlPro/superbol-studio-oss/actions/runs/13897057999/job/38879985294#step:19:33. It installed into my VS Code instance on darwin-arm, but the extension didn't load for me with a similar error to before:
[Error - 9:03:43 PM] SuperBOL Language Server client: couldn't create connection to server.
Launching server using command superbol-free failed. Error: spawn superbol-free ENOENT
The VSIX name still ends with -linux-x86.vsix.
~~I haven't tried it, but I'm guessing~~ Update: I can confirm that the same workaround from my original message (rename ~/.vscode/extensions/ocamlpro.superbol-0.1.5/_dist/superbol-free-linux-x64 to superbol-free in the same dir) still works.
Also, it seems that the executable in there is a pure ARM executable, not a Universal one.
$ file ~/.vscode/extensions/ocamlpro.superbol-0.1.5/_dist/superbol-free-linux-x64
/Users/ilyagr/.vscode/extensions/ocamlpro.superbol-0.1.5/_dist/superbol-free-linux-x64: Mach-O 64-bit executable arm64
You can compare this to:
$ file /bin/cat
/bin/cat: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/bin/cat (for architecture x86_64): Mach-O 64-bit executable x86_64
/bin/cat (for architecture arm64e): Mach-O 64-bit executable arm64e
I don't believe this is fixed. I'm pretty sure experienced this problem on master after bba8516.
Moreover, I just tried out the "Universal" binaries generated in 4f607a9, specifically https://github.com/OCamlPro/superbol-studio-oss/actions/runs/13897057999/artifacts/2763671785 from https://github.com/OCamlPro/superbol-studio-oss/actions/runs/13897057999/job/38879985294#step:19:33. It installed into my VS Code instance on
darwin-arm, but the extension didn't load for me with a similar error to before:[Error - 9:03:43 PM] SuperBOL Language Server client: couldn't create connection to server. Launching server using command superbol-free failed. Error: spawn superbol-free ENOENT
The universal extension is actually built on ubuntu-latest (see this step): its link is https://github.com/OCamlPro/superbol-studio-oss/actions/runs/13897057999/artifacts/2763664015 (and I still believe it should work — it includes no binaries per se, only Javascript code).
The VSIX name still ends with
-linux-x86.vsix.
Here you're right that's actually an issue (but only in the name of the VSIX I think).
~I haven't tried it, but I'm guessing~ Update: I can confirm that the same workaround from my original message (rename
~/.vscode/extensions/ocamlpro.superbol-0.1.5/_dist/superbol-free-linux-x64tosuperbol-freein the same dir) still works.Also, it seems that the executable in there is a pure ARM executable, not a Universal one.
$ file ~/.vscode/extensions/ocamlpro.superbol-0.1.5/_dist/superbol-free-linux-x64 /Users/ilyagr/.vscode/extensions/ocamlpro.superbol-0.1.5/_dist/superbol-free-linux-x64: Mach-O 64-bit executable arm64 You can compare this to:
$ file /bin/cat /bin/cat: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e] /bin/cat (for architecture x86_64): Mach-O 64-bit executable x86_64 /bin/cat (for architecture arm64e): Mach-O 64-bit executable arm64e
At the moment there is no arm64 version, only an x86_64 version that should be emulated transparently on macos.