New to roc, just setting it up in a WSL image no my windows box.
Vscode works fine with the remote server behavior and the extension seems fine. The language server does not work seeing the errors below in the log.
Is this expected at the moment?
I can understand roc being new and maybe the extension for vscode can't do the remote dance yet.
You are ready to Roc![Error - 11:07:17 PM] Client roc-lang: connection to server is erroring.
write EPIPE
Shutting down server.
Hi Robin,
In the settings of the roc-lang-unofficial extension you need to provide the path to the roc language server binary (included in the alpha or nightly archive) or did you already do that?
Yes followed the instructions.
NOTE: I am running vscode on my windows desktop and it connects to vscdoe server in the WSL. I thought this might complicate it.
Though it has worked for most any other addons ive used over the years.
:+1: I'll try to reproduce this on my pc and investigate (probably today)
I'm not sure how much you know about wsl2.
but just running "code" in wsl shell will setup the vscode server for you in the wsl linux and start vscode on desktop and it connects automatically.
I didn't know that, I'll try it like that
I used Roc this way for couple of months.
VSCode on windows and the Roc code was on WSL2 Ubuntu.
Everything worked OK.
My roc language server was on WSL - not on windows. That might be worth checking.
my roc servers is inside the wsl image.
I run debian, but there are no other errors.
But I will try ubuntu tomorrow to see.
Can you share your debian version? That way I can use it for the reproduction
I've just retried in Ubuntu-22.04
Did an apt update && apt upgrade.
Installe roc into /home/rluiten/.local/bin/roc_nightly-linux_x86_64-2025-03-22-c47a8e9
Added that to path in .bashrc.
so roc version
works.
Lauched vscode with 'code .' in a folder with trivial main.roc in it.
The installed "Roc (Unofficial)".
Set the Roc-lang > Languae-server: Exe fild in exension to
/home/rluiten/.local/bin/roc_nightly-linux_x86_64-2025-03-22-c47a8e9
Getting same error as follows. (not set path of roc lsp)
LS executable path: Some(/home/rluiten/.local/bin/roc_nightly-linux_x86_64-2025-03-22-c47a8e9)
LS debug executable path: None
You are ready to Roc![Error - 12:06:12 AM] Client roc-lang: connection to server is erroring.
write EPIPE
Shutting down server.
turns out i didnt go to bed when i should have lol :)
That is the alpha3 rolling version.
I even remembered to check my firewall logs just in case.
Never had it triggered by WSL stuff before, but its clean, but I also have it off anyway no difference.
My Ubuntu image is in WSL v2 mode - just realised may not have stated that before.
Thanks for all the details, I'll try in a bit
Given Artur's comment above. I am very surprised it doesn't just work.
I'm off to bed starting to brain fade :)
Set the Roc-lang > Languae-server: Exe file in exension to
/home/rluiten/.local/bin/roc_nightly-linux_x86_64-2025-03-22-c47a8e9
This needs to be the path to the binary, not the folder that contains the binary, so: /home/rluiten/.local/bin/roc_nightly-linux_x86_64-2025-03-22-c47a8e/roc_language_server
I have just tried with a clean WSL2 Ubuntu on clean Windows installation without vscode, etc.
I had the same problem for a moment.
When I was doing
code .
My vscode was launching not connected to WSL. I could see my wsl files, but vscode could not launch wsl programs.
The roc lang server started working for me only after I have installed the WSL extension in vscode and restarted wsl. Just clicked in the bottom left corner and selected "connect to WSL" and it installed automatically. Then close vscode and open it from WSL again.
Make sure you have something like this in the bottom left corner:
image.png
Yes, confirmed, that works, thanks @Artur Domurad :)
Thank you that works.
Oh duh... how did i miss that... sorry for my goof
Just had a thought since the document says to add the folder to path for command line usage, is there a reason the plugin cant' assume its on path and just run someting like a roc_language_server version
command.
NOTE: assuming it has a version thing or equivalent.
self configuring then?
There is an issue for this
Last updated: Jul 06 2025 at 12:14 UTC