-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement pprint support #18
Comments
@kolharsam Sounds good to me! |
@kolharsam Note that babashka patches clojure.pprint since the default one bloats the binary with GraalVM a bit. The code for that is in |
@borkdude just to be clear: while introducing support for pprint middleware for this, I need to keep in mind to load |
@kolharsam We need to make sure that in babashka itself babashk.impl.pprint is loaded before babashka.nrepl.
So I think we're good. |
* pprint support: Fix querying middleware The pprint support erroneously used the value of the middleware as the map to look into. Also, it seems that the type of the middleware is a string, not a symbol. This fixes sthis by swapping the argument order and changing the pretty printer lookup up to use string keys. * pprint support: wrap pprint to not use *out* * pprint: Add test * Test different pprint middleware settings
* pprint support: Fix querying middleware The pprint support erroneously used the value of the middleware as the map to look into. Also, it seems that the type of the middleware is a string, not a symbol. This fixes sthis by swapping the argument order and changing the pretty printer lookup up to use string keys. * pprint support: wrap pprint to not use *out* * pprint: Add test * Test different pprint middleware settings
All working now. Thanks @kolharsam, @Grazfather and @bbatsov! |
That's pretty useful feature that allows clients to specify the way results would be printed. I'm guessing that getting this to work with babashka shouldn't be very hard.
See https://nrepl.org/nrepl/0.7.0/design/middleware.html#_pretty_printing and https://github.com/nrepl/nrepl/blob/master/src/clojure/nrepl/middleware/print.clj for more details.
The text was updated successfully, but these errors were encountered: