When an nREPL message with :value nil is read, the value callback handler is not invoked.
Should the callback code be checking for the presence of the key, rather than it's value, or was this by design?
Hmm... I'm confused.
It does seem to be calling the value handler in that case, or perhaps I am misunderstanding.
; nREPL 0.1.5-preview
user> (print "hi")
Which specific interaction are you using where it doesn't seem to be working right?
The eval task sends back strings, so the value the response handler sees is "nil".
I was working on the ritz codeq-def middeware, which returns a list of source definitions for display in a popup buffer. The middleware returns a (possibly empty) list, rather than the pr'd string. I'm debating now if that is a reasonable thing to do, but tend to think it is a valid use of the value, as it is something that bencode decodes properly.
Ah right, I knew those were coming back as strings but spaced it.
I agree, it should be valid, and this is a bug.
I pushed a branch called nil-value which should address this issue. Can you test it out when you get a chance and let me know if that works?
I guess we can close this one? @hugoduncan @kingtim