Fork me on GitHub
#cider
<
2016-03-07
>
bozhidar06:03:38

@lmergen: more details, please simple_smile

andrzejsliwa08:03:22

Hey Guys, I recently switch from Cursive to cider, and I wonder how to see in repl stdout (from log4j)? There is any best practice to deal with it? (separate buffer for output etc?)

lmergen11:03:23

myself, i just start a lein repl myself and then connect to it

lmergen11:03:37

and watch the repl stdout in the console rather than from within an emacs buffer

bozhidar12:03:56

the problem with the stdout is detailed here https://github.com/clojure-emacs/cider/issues/1588

bozhidar12:03:18

if someone wants to help out getting to the root of this issue in the middleware that’d be appreciated

bozhidar12:03:39

when people are using jack-in the missing stderr should be in their nrepl-server buffer

rickmoynihan12:03:14

When I run C-c C-t C-t on one of my deftest forms I get the following error:

rickmoynihan12:03:02

Debugger entered--Lisp error: (wrong-type-argument stringp nil) propertize(nil face font-lock-type-face) cider-propertize(nil ns) cider-test-echo-summary((dict "error" 0 "fail" 0 "ns" 1 "pass" 0 "test" 0 "var" 1) (dict)) #[257 "\306\307\"\306\310\"\306\311\"\306\312\"\306\313\"\314\235\203$\315\316\317\300\320\"\"\202\211\203.\321!\202\211\211\2038\322!\202\211\205\211\306\323\"\306\324\"\325!\210\326\"\210\327\\!\203b \203o\330\331\f \"#\202\207\332\f!\205\207r\fq\210\333\334 \210*\330\f#\266\202\207" ["drafter.routes.draftsets-api-test" cider-test-last-summary cider-test-last-results cider-test-show-report-on-success cider-test-report-buffer cider-auto-select-test-report-buffer nrepl-dict-get "summary" "results" "status" "out" "err" "namespace-not-found" message "No test namespace: %s" cider-propertize ns cider-emit-interactive-eval-output cider-emit-interactive-eval-err-output "error" "fail" cider-test-highlight-problems cider-test-echo-summary zerop cider-test-render-report cider-popup-buffer get-buffer t erase-buffer inhibit-read-only] 12 "\n\n(fn RESPONSE)"]((dict "id" "295" "results" (dict) "session" "9599602d-6178-4b4e-9fc6-3b3f21cf155b" "summary" (dict "error" 0 "fail" 0 "ns" 1 "pass" 0 "test" 0 "var" 1) "testing-ns" "drafter.routes.draftsets-api-test")) nrepl--dispatch-response((dict "id" "295" "results" (dict) "session" "9599602d-6178-4b4e-9fc6-3b3f21cf155b" "summary" (dict "error" 0 "fail" 0 "ns" 1 "pass" 0 "test" 0 "var" 1) "testing-ns" "drafter.routes.draftsets-api-test")) nrepl-client-filter(#<process nrepl-connection> "d2:id3:2957:resultsde7:session36:9599602d-6178-4b4e-9fc6-3b3f21cf155b7:summaryd5:errori0e4:faili0e2:nsi1e4:passi0e4:testi0e3:vari1ee10:testing-ns33:drafter.routes.draftsets-api-tested2:id3:2957:session36:9599602d-6178-4b4e-9fc6-3b3f21cf155b6:statusl4:doneee")

rickmoynihan12:03:28

(Sorry about the paste - slack was erroring when I tried to upload a snippet)

rickmoynihan12:03:00

I think it might happen when the is is in another namespace

bozhidar12:03:29

I think this was fixed in the morning

bozhidar12:03:31

(my morning)

bozhidar12:03:38

try updating cider

bozhidar12:03:49

I’m guessing you’re using 0.12-snapshot

bozhidar12:03:57

file a ticket and we’ll fix it

bozhidar12:03:03

bugs happen simple_smile

jan.zy12:03:22

@bozhidar: what’s your workflow when you write code in cider-nrepl project? I was hacking around there for 30 minutes so far and it was quite time consuming: - update code in cider-nrepl - publish cider-nrepl to local repo - restart test repl to check changes. How do you do that?

bozhidar12:03:48

you don’t need to do any of this

bozhidar12:03:55

re-evaluting things in cider-nrepl

bozhidar12:03:05

is immediately reflected

bozhidar12:03:13

in the running cider session

bozhidar12:03:43

and when you add new middleware

bozhidar12:03:53

you just have to restart cider between jack-ins

rickmoynihan12:03:11

@bozhidar: will do - I usually like asking here first though - as you normally tell me if it's already fixed or is a dupe... lazy of me know!

jan.zy12:03:24

hmm, I thought that cider would use cider-nrepl jar from local .m2 repo

jan.zy12:03:10

how does cider recognize that during development of cider-nrepl project it should not use cider-nrepl version fetched from clojars / .m2 ? and use code in the project instead

bozhidar12:03:30

see project.clj simple_smile

jan.zy12:03:44

i am looking at it right now..

bozhidar12:03:47

as cider-nrepl declares the middleware explicitly this takes precedence

jan.zy12:03:59

ahh :dev !

bozhidar12:03:04

over the what would be injected or come via profile.clj

bozhidar12:03:12

quite convenient simple_smile

bozhidar12:03:22

I’d go crazy if I had to restart all the time

jan.zy12:03:47

that’s why i asked about that 😉

base69815:03:10

@rickmoynihan: ^ I've seen that behavior

rickmoynihan17:03:32

@base698: interesting - is my assumption correct? I haven't had a chance to assemble a minimal test case yet

base69817:03:29

Haven't tested it out in enough detail

lmergen21:03:07

i have seen that error

lmergen21:03:12

my solution was to shut down and restart emacs

lmergen21:03:21

it occurs about once or twice a week

lmergen21:03:41

restarting and reconnecting the repl does not solve it

lmergen21:03:51

so it's something within emacs' state

echristopherson21:03:14

@base698: how's that evil map coming?

base69821:03:13

@echristopherson:

(evil-leader/set-key-for-mode 'clojure-mode "." 'cider-find-dwim
                                            "," 'cider-pop-back
                                            "<SPC>j" 'cider-jack-in             
                                            "tt" 'cider-test-run-test
                                            "tf" 'cider-test-rerun-tests
                                            "<SPC>t" 'cider-test-run-tests
                                            "er" 'cider-eval-region
                                            "ee" 'cider-eval-last-sexp
                                            "ex" 'cider-eval-last-sexp-and-replace
                                            "eb" 'cider-eval-buffer
                                            "<SPC>i" 'cider-interrupt
                                            "<SPC>d" 'cider-doc)

echristopherson21:03:37

I've been too lazy to craft something for evil, so I took the easy way out and started learning emavcs 😉

base69821:03:31

yeah my pinkies, would hate me if I did that

base69821:03:41

using space for leader is life changing

echristopherson21:03:29

but yeah, I could easily do space and bs for things

echristopherson21:03:41

I use my pinky for plenty of ctrl key bindings in vim anyway

echristopherson21:03:58

and cmd-tab in general os x use

base69821:03:39

yeah I use it for those, but it really cuts down by just doing <SPC>x

base69821:03:10

it's mainly the holding key bindings and ones that involve to keys

echristopherson21:03:02

copying from slack is weird

echristopherson21:03:19

it copied a bunch of spaces on the <SPC>j line fnar

echristopherson21:03:32

oh, maybe you have that in your file

base69821:03:46

yeah probably

base69822:03:39

I keep seeing an error about IObj when #dbg is used. can't seem to instrument a function

malabarba23:03:58

What's the function like?

base69823:03:58

If I see it again I'll try to come up with a test case