This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-18
Channels
- # admin-announcements (13)
- # announcements (1)
- # aws (17)
- # beginners (1)
- # boot (113)
- # cider (71)
- # cljs-dev (7)
- # clojure (93)
- # clojure-android (2)
- # clojure-berlin (1)
- # clojure-dev (22)
- # clojure-italy (3)
- # clojure-japan (1)
- # clojure-poland (41)
- # clojure-russia (96)
- # clojurescript (140)
- # cursive (11)
- # datomic (27)
- # devcards (1)
- # devops (1)
- # events (4)
- # funcool (3)
- # hoplon (133)
- # immutant (7)
- # ldnclj (22)
- # leiningen (5)
- # off-topic (6)
- # om (22)
- # onyx (12)
- # re-frame (8)
- # reagent (12)
For years I've had a trick, running (alter-var-root #'*out* (constantly *out*))
would let me println from other threads into my cider repl buffer. Something recently broke this. I can still see the attempts to print (and read the strings) in the nrepl-messages buffer, but nothing happens on the repl.
it's one of the common criticisms of nrepl and cider, but i've been able to work around it for a long time
and has its own module logic and stuff, which, tbh makes it hard to understand what emacs does itself
I think it's related to https://github.com/clojure-emacs/cider/commit/50e3446768b512b76b5d3e27a3044d01d9045084
@malabarba: testing your middleware, it works
@bozhidar: thanks for the warning - can you tell me when it's safe to run cask update
again? 😉
To be fair, the warning in the first snippet lists all the versions as looking correct: ; CIDER 0.9.1 (Java 1.8.0_25, Clojure 1.5.1, nREPL 0.2.11)
(I’m starting it up via a script, not sure about all the things it’s doing in clj-land)
if it's an embedded nrepl there's some additional stuff you have to do to enable the middleware
Yeah, some embedded stuff probably, I’ll track it down - looks like I have to include this stuff https://github.com/clojure-emacs/cider-nrepl#via-leiningen ?
So it’s likely an issue with the way lein-ring starts nrepl, not sure it’s configurable
yeah, probably so; it's fairly easy to start the nrepl server yourself, just a couple lines: https://github.com/clojure-emacs/cider-nrepl#via-embedding-nrepl-in-your-app
@gtrak: It’s definitely something with lein-ring, it doesn’t seem to respect any of the nrepl settings
@sgrove: actually it looks like lein-ring will honor :nrepl-middleware
in your project.clj
https://github.com/weavejester/lein-ring/blob/master/src/leiningen/ring/server.clj#L46
@pbostrom: Looks like that works, yeah - just had to upgrade from my older version. Thanks again!
@malabarba: seen this yet? not sure what caused it.
ERROR [2015-09-18 22:03:06,794] com.yammer.dropwizard.jersey.LoggingExceptionMapper: Error handling a request: 8cf72e1a7bae9e6a
! java.lang.IllegalArgumentException: No matching method found: write for class java.io.OutputStreamWriter
! at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:80)
! at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
! at cider.nrepl.middleware.out$fork_out$fn__20648.doInvoke(out.clj:45) ~[na:na]
! at clojure.lang.RestFn.invoke(RestFn.java:423)
! at cider.nrepl.middleware.out.proxy$java.io.Writer$ff19274a.write(Unknown Source) ~[na:na]
! at java.io.PrintWriter.write(PrintWriter.java:405) ~[na:1.8.0_45-internal]
! at java.io.PrintWriter.append(PrintWriter.java:1063) ~[na:1.8.0_45-internal]
! at java.io.PrintWriter.append(PrintWriter.java:56) ~[na:1.8.0_45-internal]
! at clojure.core$pr.doInvoke(core.clj:3563)
! at clojure.lang.RestFn.applyTo(RestFn.java:139)
! at clojure.core$apply.invoke(core.clj:630)
! at clojure.core$prn.doInvoke(core.clj:3593)
! at clojure.lang.RestFn.applyTo(RestFn.java:137)
! at clojure.core$apply.invoke(core.clj:630)