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

Isolate nrepl-client connection logic from CIDER #903

Merged
merged 1 commit into from
Dec 27, 2014

Conversation

vspinu
Copy link
Contributor

@vspinu vspinu commented Nov 28, 2014

Hi Bozhidar,

I have just writen a nREPL client and server for R and with this patch I can sucesfuly connect/jack-in. There are a bunch of other, less critical, cider links that must be broken. I will be addressing those gradually.

I hope you would be fine with spliting nrepl into a separte package eventually.

Thanks.


Allow nrepl-client to be used by non CIDER frontends.

  • Frontends can control the creation of the client buffer through
    nrepl-create-client-buffer-function.
  • Each frontend has it's own xxx-connected-hook which is run by
    xxx--connected-handler. The latter function is placed in the local
    nrepl-connected-hook during the client buffer initialization. Similarly for
    xxx-disconnected-hook.
  • Rename nrepl--init-connection-buffer -> nrepl--init-capabilities

@bbatsov
Copy link
Member

bbatsov commented Nov 30, 2014

I'll review this after I'm done with the bugfixes scheduled for 0.8.2. While I don't mind splitting cider and nrepl, I have a feeling this will be problematic/hard and I'm not overly eager to deal with this right now.

(defcustom cider-connected-hook nil
"List of functions to call when connected to Clojure nREPL server."
:type 'hook
:group 'cider)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are missing package-version properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are missing package-version properties.

I wonder if the defcustom is really needed here. I added them because defcustom was used fornrepl-connection-hook.

@bbatsov
Copy link
Member

bbatsov commented Dec 21, 2014

This needs a changelog entry.

@vspinu
Copy link
Contributor Author

vspinu commented Dec 21, 2014

This needs a changelog entry.

All set.

"List of functions to call when connected to Clojure nREPL server."
:type 'hook
:group 'cider
:version "0.8.2")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 0.9.0 actually.

@vspinu vspinu force-pushed the isolate-nrepl branch 2 times, most recently from ce1fd09 to 0cc3d7b Compare December 27, 2014 01:33
@vspinu
Copy link
Contributor Author

vspinu commented Dec 27, 2014

All fixed.

nrepl-connection-buffer client-buf
nrepl-repl-buffer (when replp client-buf)
nrepl-repl-buffer client-buf
nrepl-buffer-ns "user"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed. See the commit which made nrepl-buffer-ns more generic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got confused with most recent conflicts. I thought that you have just added that line. Fixed.

Allow `nrepl-client` to be used by non CIDER frontends.

- Frontends can control the creation of the client buffer through
  `nrepl-create-client-buffer-function`.

- Each frontend has it's own `xxx-connected-hook` which is run by
  `xxx--connected-handler`. The latter function is placed in the local
  `nrepl-connected-hook` during the client buffer initialization. Similarly for
  `xxx-disconnected-hook`.

- Rename `nrepl--init-connection-buffer` -> nrepl--init-capabilities
bbatsov added a commit that referenced this pull request Dec 27, 2014
Isolate `nrepl-client` connection logic from CIDER
@bbatsov bbatsov merged commit 6ec5cea into clojure-emacs:master Dec 27, 2014
@vspinu vspinu deleted the isolate-nrepl branch August 1, 2017 10:46
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.

2 participants