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

Enable Unix domain socket support #418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chancerussell
Copy link

Resolves #417.

The socket support can be tested by starting a repl with a command like clj -Srepro -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.1.1"}}}' -M -m nrepl.cmdline --socket /tmp/my_socket then connecting to it in Vim with :FireplaceConnect /tmp/my_socket.

This patch allows users to connect to nREPL servers running on Unix domain sockets by modifying :FireplaceConnect to let users provide a connection string pointing to a socket file on the filesystem.

This is accomplished by modifying the setup code to identify such connection strings and skip the URL building process and updating the Python script to look for non-URL strings and attempt to connect to them as socket type AF_UNIX.

For now, socket connections are assumed to be using the nrepl scheme, and the current directory (or b:java_root) is used to populate the "Scope connection to: " prompt.

Also removes the vestigial second argument to the Python script.

This patch allows users to connect to nREPL servers running on Unix
domain sockets by modifying :FireplaceConnect to let users provide
a connection string pointing to a socket file on the filesystem.

This is accomplished by modifying the setup code to identify such
connection strings and skip the URL building process and updating the
Python script to look for non-URL strings and attempt to connect to them
as socket type `AF_UNIX`.

For now, socket connections are assumed to be using the `nrepl` scheme,
and the current directory (or `b:java_root`) is used to populate the
"Scope connection to: " prompt.

Also removes the vestigial second argument to the Python script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow connection to AF_UNIX socket nREPL servers
1 participant