Fork me on GitHub
#cider
<
2015-09-18
>
bozhidar07:09:40

don’t ring a bell

bozhidar07:09:57

feel free to file a ticket (with some steps to reproduce this)

gtrak11:09:24

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.

gtrak11:09:33

what could've changed recently to break that?

gtrak11:09:46

since a week ago

malabarba11:09:37

Dunno. But I'm about to push a middleware that's gonna do that for you

gtrak12:09:08

it's one of the common criticisms of nrepl and cider, but i've been able to work around it for a long time simple_smile

gtrak12:09:43

btw, in lieu of println I tried out the debugger again, so sweet.

nooga13:09:24

I'm running cider 0.9.1 as a part of emacs-live

nooga13:09:29

I'm afraid to update

arrdem13:09:20

I've been running CIDER latest for literally two years with only two days of broken.

arrdem13:09:24

your fears are unfounded.

nooga13:09:01

it's the emacs-live I fear

nooga13:09:22

I tried updating cider from 0.9 to 0.9.1 and it was hard already

nooga13:09:57

and I'm too weak to roll my own .emacs.d and drop emacs-live

arrdem13:09:04

chalk up another one to starter kits being a bad idea.

malabarba13:09:17

backup ~/.emacs.d/

malabarba13:09:32

If things go wrong, that's all you need to restore.

malabarba13:09:55

Assuming emacs-live doesn't do something silly

arrdem13:09:06

As far as I know it doesn't.

nooga13:09:34

it has .live-packs besides .emacs.d

arrdem13:09:34

nooga: if you want it I can just paste the clojure specific subset of my .emacs

arrdem13:09:47

it bootstraps itself and everything :P

nooga13:09:35

and has its own module logic and stuff, which, tbh makes it hard to understand what emacs does itself

nooga13:09:23

@arrdem: that'd be awesome, please

arrdem14:09:44

can do oen minute

gtrak14:09:24

repl autocomplete seems broken on latest elisp

gtrak14:09:54

Wrong type argument: integer-or-marker-p, nil

gtrak14:09:12

actually regular autocomplete is also broken

gtrak14:09:34

I'll try bouncing my cider-nrepl snapshot too

gtrak15:09:54

still seems broken

gtrak15:09:48

@bozhidar: I git bisected to 9eedb0562f878c0903c10c1194dd7f032d20abe1

bozhidar15:09:20

it was broken in the previous commit for sure as well

bozhidar15:09:29

I’ll ping the author of the relevant change

bozhidar15:09:38

as I don’t have time to investigate the problem now

bozhidar15:09:04

btw, lately master has been more unstable than usual

bozhidar15:09:19

the usual combo of sweeping changes and non-existing tests

bozhidar15:09:23

sorry about this

bozhidar15:09:30

things should settle down in a month or two

gtrak15:09:10

yea, normally I update much less often, but the print issue is bothersome

gtrak15:09:04

@malabarba: testing your middleware, it works simple_smile

malabarba15:09:33

Good to know

malabarba15:09:52

We'll merge as soon as I have time to polish the edges

gtrak15:09:16

but for now I can get work done again.

pandeiro18:09:31

@bozhidar: thanks for the warning - can you tell me when it's safe to run cask update again? 😉

sgrove19:09:19

Here’s my profiles.clj in the same directory as project.clj:

sgrove19:09:45

Everything looks good there, right?

pbostrom19:09:18

yeah I think so

sgrove19:09:53

Baffling 😛

sgrove19:09:26

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)

pbostrom19:09:43

how are you starting your repl?

sgrove19:09:28

That’s a good question, let me play around with that for a bit

sgrove19:09:44

(I’m starting it up via a script, not sure about all the things it’s doing in clj-land)

pbostrom19:09:13

if it's an embedded nrepl there's some additional stuff you have to do to enable the middleware

sgrove19:09:20

@pbostrom: Yeah, that looks like the likely culprit, thanks.

sgrove19:09:14

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 ?

sgrove19:09:19

So it’s likely an issue with the way lein-ring starts nrepl, not sure it’s configurable

pbostrom19:09:38

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

pbostrom19:09:52

cider is no fun without the middleware simple_smile

gtrak19:09:38

@sgrove: I do it in the user profile, maybe that makes a difference

sgrove19:09:15

@gtrak: It’s definitely something with lein-ring, it doesn’t seem to respect any of the nrepl settings

pbostrom19:09:39

@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

sgrove19:09:51

@pbostrom: Looks like that works, yeah - just had to upgrade from my older version. Thanks again!

bozhidar20:09:52

we should probably add this to the README (the info regarding lein-ring I mean)

gtrak22:09:12

@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)

gtrak22:09:26

i'll be able to look at it again this weekend