Print java.time.Instant as #inst
A follow-up to #10, it would be great to also print the newer java.time.* classes as #inst.
thanks for deep-diff!
I don't have time just now but at some point I'd like to have a go getting deep-diff print java.time objs printed using https://github.com/henryw374/time-literals. which would work in cljs as well
thanks for deep-diff!
I don't have time just now but at some point I'd like to have a go getting deep-diff print java.time objs printed using https://github.com/henryw374/time-literals. which would work in cljs as well
actually nothing in deep-diff needs to change for this to work, just add time-literals or equivalent to deps so java.time classes read/print time literals.
IOW this is not a responsibility deep-diff should have
I don't think that's really true, Puget has its own dispatch logic and type-specific handlers
(we forked puget and inlined it to add cljs support)
https://github.com/lambdaisland/deep-diff2/blob/master/src/lambdaisland/deep_diff2/puget/printer.cljc#L295-L355
ah I wasn't using pretty-print, just diff - I see pretty-print doesn't use tagged literals by default.
supplying pretty-print with a printer configured as {:print-fallback :print} does the trick.
It'd be interesting to know why that isn't the default though.
I didn't even realize that was a thing. This changes everything. (well maybe not everything but yes that should be the default).
After this MR, it seems that this issue is solved, doesn't it?