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

trampoline repl fails #6

Closed
trptcolin opened this issue Jun 28, 2014 · 7 comments
Closed

trampoline repl fails #6

trptcolin opened this issue Jun 28, 2014 · 7 comments

Comments

@trptcolin
Copy link

I'm having some trouble tracking down why this is exactly, but lein trampoline repl will work without whidbey, but not with it. I tracked it down to the following request/reply sequence, but I'm not sure how this is happening:

# Both of these use pr-str
request: {:id "84c93587-7b69-4f2e-8664-28945c839272", :code "(clojure.core/binding [clojure.core/*ns* (clojure.core/symbol \"reply.eval-modes.nrepl\")] (set! *print-length* nil))", :op "eval"}
response: {:id "84c93587-7b69-4f2e-8664-28945c839272", :ns "user", :session "f10af298-3a82-4351-8d24-c6d537d9e838", :value []}

Note: the value is [] instead of "nil" or even "[]", so REPLy's read-string call fails on it. I actually haven't done much w/ nREPL middleware, but I'm wondering if somehow whidbey only gets partially installed or something under lein trampoline. Any ideas?

@greglook
Copy link
Owner

Hmm, I can reproduce this locally. I'll have to check out the trampoline setup code. It seems like whidbey is successfully dissoc'ing the default pr-values middleware, but maybe somehow not running and converting the :value in the response to a string?

@trptcolin
Copy link
Author

Yeah, that's what I'm seeing. I can even (throw (Exception. "foo")) inside the fn constructed inside render-values. It's just not getting called, which makes me think maybe a lein bug w/ trampoline repl (not used as often) not hooking up middleware? Still not sure where [] comes from though, since it ought to be nil even if it's not printed.

@gfredericks
Copy link
Contributor

Could this be related to NREPL-53?

Here's a leiningen profile that simulates my patch for that issue, which should help test that hypothesis.

@cemerick
Copy link

cemerick commented Feb 9, 2015

NREPL-53 is fixed as of [org.clojure/tools.nrepl "0.2.7"], so maybe @gfredericks' patch resolves this?

@greglook
Copy link
Owner

Thanks for the heads up @cemerick, I'll test it out!

@gfredericks
Copy link
Contributor

Related: technomancy/leiningen#1829

@greglook
Copy link
Owner

Hey, this started working at some point!

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