Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRAMP support #30

Open
Silex opened this issue May 24, 2014 · 5 comments
Open

TRAMP support #30

Silex opened this issue May 24, 2014 · 5 comments

Comments

@Silex
Copy link

Silex commented May 24, 2014

Hello,

Is there any ways to have this work over TRAMP? I guess not but asking never hurts :)

@dgutov
Copy link
Owner

dgutov commented May 24, 2014

Where there's a will, there's a way. :)

It shouldn't be particularly hard. The biggest part would be to make inf-ruby and inf-ruby-console-auto launch the REPL process on the remote machine when called from a remote buffer.

After that, you should only have to change Robe settings to point to the remote machine instead of the localhost (and make sure the port that we use is open there).

@Silex
Copy link
Author

Silex commented May 24, 2014

Hah, good! I think another step to do is that the require 'robe' done inside inf-ruby tries to set the path to the local machine, so you'd need to upload that file to the remote machine first and set the path differently.

Ok basically it's possible but setting it up might require some annoying work (having to open a remote port is annoying for me).

[EDIT]: maybe it's possible to write some start-file-process to start the robe server and communicate through this instead? it supports TRAMP processes.

@dgutov
Copy link
Owner

dgutov commented May 24, 2014

I think another step to do is that the require 'robe' done inside inf-ruby tries to set the path to the local machine, so you'd need to upload that file to the remote machine first and set the path differently.

Ah! That's right, sorry. In that case, you'd probably prefer to wait until Robe is gem-ified, which will make that non-issue. I've been meaning to do a large-ish rewrite before that, and incorporate the use of parser for type inference, but can't really tell when that'll happen. Probably not in the next couple of weeks.

Ok basically it's possible but setting it up might require some annoying work (having to open a remote port is annoying for me).

Doesn't CIDER work similarly to that? nREPL is a network protocol, I believe. SLIME, too.

[EDIT]: maybe it's possible to write some start-file-process to start the robe server and communicate through this instead? it supports TRAMP processes.

Launching a process and communicating with it though stdin/stdout has two hurdles:

  • The HTTP protocol gives us request-response cycle for free, not so with the standard IO.
  • If Robe is launched as a process, instead of being loaded in an already running process, it'll have to learn to load environments of various kinds of projects: gems, Rails, some other kinds of applications.

@Silex
Copy link
Author

Silex commented May 25, 2014

I think another step to do is that the require 'robe' done inside inf-ruby tries to set the path to the local machine, so you'd need to upload that file to the remote machine first and set the path differently.

Ah! That's right, sorry. In that case, you'd probably prefer to wait until Robe is gem-ified, which will make that non-issue. I've been meaning to do a large-ish rewrite before that, and incorporate the use of parser for type inference, but can't really tell when that'll happen. Probably not in the next couple of weeks.

A'ight.

Ok basically it's possible but setting it up might require some annoying work (having to open a remote port is annoying for me).

Doesn't CIDER work similarly to that? nREPL is a network protocol, I believe. SLIME, too.

Probably, don't get me wrong this is not a design criticism, just a pragmatic observation :) Most of my boxes don't have a firewall so this should be a non-issue.

[EDIT]: maybe it's possible to write some start-file-process to start the robe server and communicate through this instead? it supports TRAMP processes.
Launching a process and communicating with it though stdin/stdout has two hurdles:

The HTTP protocol gives us request-response cycle for free, not so with the standard IO.
If Robe is launched as a process, instead of being loaded in an already running process, it'll have to learn to load environments of various kinds of projects: gems, Rails, some other kinds of applications.

Yeah, I was just exploring ideas. I recently discovered about file-start-process which in magit allows us to do interactive rebases over TRAMP :)

@ylluminarious
Copy link

@dgutov Any more progress on this? I'm also seeing LoadError: cannot load such file -- robe. I'm not sure what I need to do to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants