Fork me on GitHub
#cider
<
2017-07-25
>
bbrinck02:07:09

I’m working on a library to format clojure.spec errors. When error are (intentionally) thrown, I see a difference between the output in *cider-repl localhost* and in *cider-error* - namely, *cider-error* doesn’t look correct with respect to newlines https://gist.github.com/bhb/3a6327773c8e6b490ff249bed5c20b55

bbrinck02:07:49

Error are thrown when spec “instrumentation” is enabled and the user calls a function with invalid params

bbrinck02:07:42

does the *cider-error* handle newlines in a special way or expect multi-line strings to be formatted in a specific way? I’m on cider 0.15.0

dpsutton02:07:42

@bbrinck can you post a screenshot of the whole *cider-error* buffer?

bbrinck02:07:22

yes, can do. i have also corrected the gist: i messed it up when I tried to alter it to make the example clearer 😞

dpsutton02:07:18

i've got to go cook some dinner but i think this is your function you want to look at:

dpsutton02:07:41

i believe that it's the note var

bbrinck02:07:24

OK, I’ll take a look. Thanks for the pointer!

dpsutton03:07:44

@bbrinck can you give me a repo that has a minimum reproduction? or perhaps instructions on how to create it? I haven't delved into spec yet because it's alpha

dpsutton03:07:16

i think it's actually cider-stacktrace-emit-indented at issue here. i'm just not sure why the message isn't multiline, but some parts of it are

cjhowe19:07:32

can you debug a test with cider?

dpsutton19:07:24

instrument the function you want to test and then C-c C-t t to run a test at point and it should work

cjhowe19:07:19

oh, but i can't use #dbg or #break?

dpsutton19:07:40

i imagine you can

dpsutton19:07:55

i never use those. i just hit C-u C-M-x to instrument

dpsutton19:07:00

did you try it?

cjhowe19:07:56

yes, it works with C-u C-M-x, thanks! it just doesn't work with the #dbg and #break forms, i wish i could use them to get to what i want to debug faster, but oh well!

dpsutton19:07:47

huh. weird. feel free to open a ticket

dpsutton19:07:02

when you put #dbg, did you re-eval the function?

dpsutton19:07:42

try re-evaling it

dpsutton19:07:50

i'm able to debug a test with the #dbg form

cjhowe19:07:12

oh, you have to re-eval it? i thought C-c C-x was enough

cjhowe19:07:00

oh, it works! sweet, thanks!

dpsutton19:07:23

awesome. malabarba and vspinu have done amazing work with the debugger

cjhowe19:07:55

yes it's probably one of the best debuggers i've ever used

cjhowe19:07:36

i really love the trace functionality