-
Notifications
You must be signed in to change notification settings - Fork 35
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
ultra doesn't honor custom print-methods
#8
Comments
While I'm completely unfamiliar with Manifold, my guess is that this is an underlying issue with Whidbey, which injects some nREPL middleware in that is likely overriding something. Might take me a while to ferret this down. |
This is because whidbey (which uses puget under the hood) has no integration with the built in Puget's |
I think it's probably undesirable to force anybody who uses Ultra to write custom print-methods for their respective data structures. I'll try to think of some way of intelligently checking to see if Puget knows how to represent the data in question, and if not to defer to the data structure's native print methods. |
👍 I ran into this issue today @venantius I don't think the behaviour you've outlined above is the desired behaviour (at least in my case). For example, my company has a print-method for URIs so that they print as e.g. I'd prefer custom |
One option would be to add an option to Puget like |
@greglook Is In the short term something like what you're describing makes sense as an escape hatch for 90% of Ultra's use cases, I'm just trying to think about what the sensible longer term solution might look like. |
@venantius TBH, I'd prefer the option @greglook suggests of having the option to disable Puget's formatter. It'd be simple and is the behaviour that I'd expect when using a general purpose dev environment like Ultra |
If you look at the relevant code in Puget, you can see that the default dispatch for A really simple change would be to use |
After starting work on a Puget PR, I've come to realize that Manifold is something of a special case - it satisfies Since the Manifold deferred isn't realized, this ends up calling Personally, my preference would be to default to just using the |
This commit updates Puget and Whidbey to their latest versions, which gives us access to the `:print-fallback` feature. This feature honors objects' custom `print-methods`, and is a fix for #8
@ztellman I believe this issue should be resolved with Ultra 0.3.0. If you're feeling so inclined, I'd recommend updating and giving it a try. |
Better make that 0.3.2, given my release problems today :P |
Works great for me, thanks for the fix. Now I can use Ultra at work again 👍 |
Marking as resolved unless @ztellman returns to say otherwise. |
With Ultra, using
lein repl
on Manifold:w/o ultra:
I didn't take any time to dig into this, I would assume it's relatively straightforward to fix, though. Otherwise, very cool project.
The text was updated successfully, but these errors were encountered: