-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Allow connection to AF_UNIX socket nREPL servers #417
Comments
We already support literal filesystem locations. But they're used to specify the path to a directory that contains vim-fireplace/autoload/fireplace.vim Lines 644 to 646 in f2be859
So all you need to do is disambiguate with a
The circumstances where this could happen are extremely narrow: |
Very cool, I can handle that! When we hit the "str is pointing to a socket file" case, do you think we should just pass the value as the |
I would change the Then you can pass the socket path through directly, and |
nREPL has had support for running servers through AF_UNIX-style domain sockets for a while: nrepl/nrepl#270 . It'd be nice if we could connect to those servers with vim-fireplace.
I've messed around and have confirmed that vim-fireplace can talk to nREPL over a domain socket with minimal changes to the
Connection
class'ssocket
method inpythonx/fireplace.py
to instantiate the correct type of socket as appropriate. I’m less sure of how starting such a connection should work.The main question I have is: how should the user indicate that they wish to connect to a domain socket server?
Options I can think of:
FireplaceConnect
to recognize connection strings that represent filesystem locations. This might be problematic because of ambiguous cases where a given string could represent either a hostname or a filesystem location.FireplaceConnect
specifically for connecting to domain sockets. This is a little less convenient but removes the ambiguity.FireplaceConnect
. When nREPL starts up in socket mode, it prints a message likenREPL server started on socket nrepl+unix:$SOCKET_PATH
, so maybe treatingnrepl+unix:
as a magic prefix would suffice.I’ve opened #416 as a draft proof of concept. It works, but it isn’t pretty.
Thanks for all your work on vim-fireplace!
The text was updated successfully, but these errors were encountered: