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

Integration with third party nrepl middleware #11

Open
danielsz opened this issue Aug 13, 2013 · 5 comments
Open

Integration with third party nrepl middleware #11

danielsz opened this issue Aug 13, 2013 · 5 comments

Comments

@danielsz
Copy link

I'm not sure if this is the right place to submit this, but I'm looking for a solution to use both austin and ritz in the same project. I would like to debug server code with ritz, and work with an austin repl when developing client-side code.
I'm not asking to run them at the same time, the ability to alternate between the two would be good enough. If I understand correctly, the automatic nrepl middleware injections carried by both projects don't agree somehow.
This is error I get when I issue the command nrepl-ritz-jack-in in a project configured with austin, like the sample app.

WARNING] No nREPL middleware descriptor in metadata of clojure.core$comp$fn__4154@511ad529, see clojure.tools.middleware/set-descriptor![WARNING] No nREPL middleware descriptor in metadata of clojure.core$comp$fn__4154@397f0e73, see clojure.tools.middleware/set-descriptor![WARNING] No nREPL middleware descriptor in metadata of clojure.core$comp$fn__4154@448dbd82, see clojure.tools.middleware/set-descriptor!ERROR: Unhandled REPL handler exception processing message {:id 1, :op clone}

This brings up a question of nrepl middleware interplay, so I'm sorry if I inflict this issue on austin, but if anyone has a workaround, I'd love to learn about it.

@cemerick
Copy link
Owner

I don't currently use ritz (or emacs, which is where nrepl-ritz-jack-in comes from), so I can't test this immediately, but will return to it soon.

@danielsz
Copy link
Author

Thank you, @cemerick.

If it helps, I believe you can keep emacs out of the equation.
Instead of nrepl-ritz-jack-in, you can type in the root folder of a ritz and austin-enabled project, lein ritz-nreplto start the nrepl server. It will then show you the port where you can connect the client.
Establishing that connection in this context is what seems to be troublesome.

@cemerick
Copy link
Owner

@hugoduncan, can you confirm this? I figure you're using ritz and emacs all the time, and I know you've fiddled with Austin…

@hugoduncan
Copy link
Contributor

I reproduced using lein ritz-nrepl, and connecting via nrepl.el. Looks like piggieback is seeing a nil session. I would need to investigate further to find out how that can happen, but my current guess is that the session atom is not being passed correctly to the project classloader (via classlojure/eval).

[WARNING] No nREPL middleware descriptor in metadata of clojure.core$comp$fn__4154@3387f025, see clojure.tools.middleware/set-descriptor!ERROR: Unhandled REPL handler exception processing message {:id 1, :op clone}
java.lang.NullPointerException
    at clojure.core$deref_future.invoke(core.clj:2108)
    at clojure.core$deref.invoke(core.clj:2129)
    at cemerick.piggieback$wrap_cljs_repl$fn__4533.invoke(piggieback.clj:222)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__409.invoke(middleware.clj:17)
    at clojure.tools.nrepl.server$handle_STAR_.invoke(server.clj:18)
    at ritz.nrepl.exec$exec.invoke(exec.clj:36)
    at clojure.core$eval4568$fn__4569.invoke(NO_SOURCE_FILE:0)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at classlojure.core$eval_in_STAR_.doInvoke(core.clj:86)
    at classlojure.core$eval_in.doInvoke(core.clj:100)
    at ritz.repl_utils.classloader$eval_clojure_in.doInvoke(classloader.clj:118)
    at ritz.repl_utils.classloader$eval_clojure.doInvoke(classloader.clj:124)
    at ritz.nrepl.exec$exec_using_classloader.invoke(exec.clj:61)

@deg
Copy link
Contributor

deg commented Oct 21, 2013

I just discovered ritz and am trying it out. I've hit this same problem in my projects that use Austin. So, just wondering if there's been any progress on this issue? Any help I can offer from the trenches?

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

No branches or pull requests

4 participants