[CLJ-1275] print-dup's handling of metadata typehint is unreadable in some circumstances Created: 02/Oct/13 Updated: 05/Feb/14
|Affects Version/s:||Release 1.5, Release 1.6|
|Patch:||Code and Test|
With print-dup true, if an object being printed has a metadata map with only a :tag key, the printer renders it as "^value". This can cause an IllegalArgumentException if you try to read the printed string back in, in some circumstances. E.g.
This is causing problems with sleight/riddley's  handling of the (case) macro, which drops a type-hint on a gensym it incorporates in the form it returns. When sleight tries to reserialize a macroexpanded (case) form from riddley, it fails as demonstrated above. E.g.
The attached patch corrects this by making core_print.clj's print-meta always print out the full metadata map if print-dup is true. The patch also contains a test for this case.
|Comment by Alex Coventry [ 02/Oct/13 10:28 PM ]|
Corresponding bug on sleight: https://github.com/ztellman/sleight/issues/5