zed icon indicating copy to clipboard operation
zed copied to clipboard

Remote Project REPL support

Open leviska opened this issue 1 year ago • 9 comments

Summary

Run jupyter repl on remote machines

Description

From what I could understand from code:

  • Currently repl_store is global, and not updated when changing projects (i.e. connecting to remote project)
  • JupyterSettings are global too, and project settings are ignored (there is a big chance that remote machine needs different kernel configs)

It seems that current code could work on remote, if it weren't global, and it would update to changing workspaces and connecting to remote.

leviska avatar Jul 25 '24 15:07 leviska

I was trying to do this myself, but got a little bit stuck due to lack of knowledge around code base:

  • I could get my local config to match remote config, but then it would actually read local jupyter kernelspec instead of remote. I guess that's because I first open local workspace, then remote, and the global repl_store is initialized with local fs, not remote (funny enough it's reading local kernelspec but then runs it on remote)
  • I don't quite understand the difference between project/workspace/editor and it's relation to each other (see next)
  • As far as I understand, we need to observe_new_views inside ReplStore::init, and create a new repl for each (workspace/editor)
  • I was trying to look at file_finder to understand, and it works with workspaces, but here we also need editor too to get the code that we want to run, so I got a little stuck with a problem of matching both states correctly. It seems we need to have only one of (editor/workspace), and get the other from that, but I don't get it what the "parent/child" relationship here if it even exists

leviska avatar Jul 25 '24 15:07 leviska

Same problem here: Screenshot

pipegalera avatar Jul 28 '24 09:07 pipegalera

I am also facing this issue and adding a default kernel selection for the remote project in its settings.json also doesn't seem to fix this issue, even though the lsp seems to understand the remote file system correctly

KorigamiK avatar Oct 24 '24 18:10 KorigamiK

Confusingly, I'm working on support for remote jupyter servers which is not the same as the kernels via remoting (over SSH). I'll need some verbiage to differentiate between these.

rgbkrk avatar Nov 06 '24 17:11 rgbkrk

This would be a very useful feature. Thanks again for a great editor.

zachcp avatar Nov 13 '24 23:11 zachcp

+1. This would be a very nice feature to have when working remotely.

bleaktwig avatar Nov 25 '24 13:11 bleaktwig

Is this feature being actively worked on? Is there an ETA?

lunw1024 avatar Feb 22 '25 19:02 lunw1024

it seems like the recent zed versions don't even have the option for repl in remote projects

KorigamiK avatar May 30 '25 09:05 KorigamiK

it seems like the recent zed versions don't even have the option for repl in remote projects

Seems to be intentional as of #20397 But I don't know why it's also disabled for ssh remotes, there is code for remote kernels...

wrenger avatar Jun 02 '25 13:06 wrenger

it seems like the recent zed versions don't even have the option for repl in remote projects

Seems to be intentional as of #20397 But I don't know why it's also disabled for ssh remotes, there is code for remote kernels...

yeah, this sounds like they wanted to focus on other things first but this shouldn't be very time talking to fix either

KorigamiK avatar Jun 08 '25 08:06 KorigamiK

any updates?

zxy198717 avatar Oct 29 '25 14:10 zxy198717

It might be a user friendly to state that in the REPL / or Remote documentation. This would have saved me some time and despair over my incompetence.

staeff777 avatar Nov 04 '25 11:11 staeff777

Trying to use Zed on windows using WSL2 integration and this has become a blocker for me. The Jupyter kernel on wsl2 is not detected; This happens to be the single reason I am not moving to zed completely. Will stay here for updates.

10hith avatar Nov 18 '25 11:11 10hith

I don't have a Windows machine to diagnose it but I'm guessing we're looking for Jupyter kernels in App Data https://github.com/runtimed/runtimed/blob/a7bec5d805bae26650ccbbac9baaa7946d43844b/crates/runtimelib/src/dirs.rs#L88. What's the path to your kernels on WSL?

rgbkrk avatar Nov 18 '25 16:11 rgbkrk