I'm using VSCode/Calva with Live Share a lot. According to the docs, you can share local network sockets over Live Share as well. We try to use this for Calva's REPL, so that the guest can also evaluate Clojure code in the host's REPL. When the guest tries to connect to this socket, using “connect to a running REPL”, I would expect to have to provide a port number, which doesn’t happen. Instead, in the VSCode “Log (Window)“, I see this error:
[2020-10-01 13:58:17.820] [renderer1] [error] Error: EROFS: read-only file system, mkdir '/.calva': Unknown (FileSystemError) (FileSystemError): Error: EROFS: read-only file system, mkdir '/.calva'
at _handleError (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:706:514)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
It seems like Calva doesn't detect that this folder is already present on the host. Please note that if .calva is in .gitignore, which it normally is of course, on the guest I don't even see the .calva folder and output.calva-repl buffer, so I guess the mechanism needs to take this into account.
I think it's probably because jackin.ts is using fs instead of vscode.workspace.fs, see also https://code.visualstudio.com/updates/v1_37#_vscodeworkspacefs. I'll try to verify this weekend and hopefully make a PR.
jack-in.ts shouldn't be involved in a connect scenario, but we could have factored something wrong, of course.
In any case, the usage of fs could very well be the problem. We have tried to fix such usages, but there are probably a few of them still there.
Ok that's good to know. Conceptually, what I'm trying to accomplish, that should be using the command "Connect to a running REPL server in your project", right? (As opposed to the non-project one)
This has been released in 2.0.127.
Most helpful comment
I think it's probably because
jackin.tsis usingfsinstead ofvscode.workspace.fs, see also https://code.visualstudio.com/updates/v1_37#_vscodeworkspacefs. I'll try to verify this weekend and hopefully make a PR.