greglook / whidbey

nREPL middleware to pretty-print colored values
The Unlicense
158 stars 10 forks source link

Leiningen 2.9.0 & whidbey 2.1.0 adding newline to output? #30

Closed drbobbeaty closed 5 years ago

drbobbeaty commented 5 years ago

I just updated to Leiningen 2.9.0 and tried whidbey 2.1.0 and the result was that extra newlines are being added to the output: 2019-03-02 at 7 41 am If I go back to Leiningen 2.8.3 the extra newlines aren't there. Same whidbey version.

Is there something about whidbey that can be configured for the change in nREPL?

greglook commented 5 years ago

This is an unfortunate side-effect of the new approach to print IO in nrepl. Previously, whidbey would use puget to fully render the result as a string (without a newline) and then send it to the client. Now, output is streamed to the repl client, and this doesn't give whidbey an opportunity to trim the trailing newline. See #28 for some more context.

In the future this could be fixed in a couple of ways, but for now there's no easy workaround.

drbobbeaty commented 5 years ago

Thank you so much for a good description of the issue. I really appreciate it.